Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp275294ybk; Tue, 19 May 2020 22:31:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6y3cSPK/gqfcJzqTGcCOSpNSIfwiCMdtmdgzX2VhZAJueLk0TayPXjPch33iKLSSFK5WV X-Received: by 2002:a17:906:eb83:: with SMTP id mh3mr2167105ejb.361.1589952666791; Tue, 19 May 2020 22:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589952666; cv=none; d=google.com; s=arc-20160816; b=S6FChLJ+fYrrH6/f1Vfc5cOdnZoUhTf0L/ER1fvoZ+ZK+X4cLsQVS97KweB9o4tYEb lDf2BTlFTYebhF83VeTuCa5G7STslg8XOry9pyaXILFcYO4MrtBxMJEbA972cYnivUWH dpfyxCOSP2W2DeYxRNw75asoGJOXtbZw/NFb9vL21N7fG7yf+q1WonzkdEEWu/cC7wX+ J3oCEPTrVfEV7BA00oWfzgyVyUr3q+lZjM0cXNTp0Up/GwChY4vXY6T1QfjO6df4iqFy HYTNgsNMknKmI//7cjroZ1uHaxC0/6vRCrXtHP54fC2muX3q6OxwYYaHHFSTBxeKS2U6 Owog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=I4IWEay9tfHjto1pM06hhncLdwAsyJxZN27E9Fb+y+8=; b=BzEhKApTLCjqe/M1UUGmwVhOtZQrf1CLOsp+iQs4mwQ9v1nIKlS7FnrzHocXaWsTHD RSrBmaaufBtmWz1yOnUq2qLAPM75nBe0bUhURSi2gzD293D5LPHGfei+QrwGVxKEtLwk JYTtEL7aAJp5rt5157dqLLgS4O6iDABkkevfH7EEbX15SvtjWey1JgmSC54zzGSJr2DH ghDf5en4CQf/B4deoqTdENdToXOn9LER/mCiWUsAFZVkYAgyW3UFAkG6fOCdlhMwOctz rJ031L7emi6S9dqMtjqHilCYH+UWydzFNucFdYRUoa2/0iGnf/BymX8ty938sVQ8kBTm Udsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Asq3Jfgg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y24si883084edm.35.2020.05.19.22.30.44; Tue, 19 May 2020 22:31:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Asq3Jfgg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbgETF3U (ORCPT + 99 others); Wed, 20 May 2020 01:29:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbgETF3Q (ORCPT ); Wed, 20 May 2020 01:29:16 -0400 Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8546DC061A0E for ; Tue, 19 May 2020 22:29:16 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id v17so2488719qtp.15 for ; Tue, 19 May 2020 22:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=I4IWEay9tfHjto1pM06hhncLdwAsyJxZN27E9Fb+y+8=; b=Asq3JfggVRMqoaOmL40MRkmLe0/nLLbg70x2Kka2C1NuXL5dvuCykX4OYhqeegVUJ2 JkeXYyCexXXZNA7sjBbtiPv/8CCl9XjyGT4TRYqU7kXMPYttQf1d0mLj9QWhqUz6Zcaj TSsrLjiXZg3J/t5tibIyHByvjx8wKhN3t1sWpcAn+Qbv7JIRScWf/XUzD07W4Wkh3Efp 1TIi8BTOE7Jph3X3QF3hfZd9Y7luzc+/hCTtFnURLMIgMUccnsZ6LJyr5HBpKka2YBaD JuzeYKQ8vaxb9lKiXZGWCs/rTZnURcIrUHDEvFobUHYy315TKD8HQnC6eMsCYsiGL2wd lICg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=I4IWEay9tfHjto1pM06hhncLdwAsyJxZN27E9Fb+y+8=; b=atcTsma3uaq+FpPaCVel8gMZdex3rEdI20N+3ygyiGyogMZiP9aRYikxOE1HaBtPUP hruDUFVE66hK3XNqTLtK577E53gsYpKf/xNLxiR3flqqR4PDO9cuZ2edg6iaKTtnj7JW ZFOeZOb1usQuqI+x2aP16vJgp9rY5QOsHrqtl62SJjW8Xs6Q2z2IyXAMWQ2UU0jIdToi Z5RH9EYCedgXPjZTDJgHqcYLfYwmn/8+xZtEGgYIBcZRAA/5q1gP9Rli7t+T8GmWIkyw hnVQSdA2bT1o6KofBCCPmDck1wpnfAUlhmzangrekx1LX8EA2t/aHPUeq62oDxInUMi/ /59w== X-Gm-Message-State: AOAM530K7vgbZCjcyqHYTqXf4B4IvrK7F42uwoAhP/Rnc1FrvIZa5wmc DV5hysR+sEdnWMWOQAFN8W0vWLL0Mso= X-Received: by 2002:ad4:588b:: with SMTP id dz11mr3121275qvb.226.1589952555723; Tue, 19 May 2020 22:29:15 -0700 (PDT) Date: Tue, 19 May 2020 22:28:58 -0700 In-Reply-To: <20200520052908.204642-1-walken@google.com> Message-Id: <20200520052908.204642-3-walken@google.com> Mime-Version: 1.0 References: <20200520052908.204642-1-walken@google.com> X-Mailer: git-send-email 2.26.2.761.g0e0b3e54be-goog Subject: [PATCH v6 02/12] MMU notifier: use the new mmap locking API From: Michel Lespinasse To: Andrew Morton , linux-mm Cc: LKML , Peter Zijlstra , Laurent Dufour , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan , John Hubbard , Michel Lespinasse , Davidlohr Bueso Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This use is converted manually ahead of the next patch in the series, as it requires including a new header which the automated conversion would miss. Signed-off-by: Michel Lespinasse Reviewed-by: Daniel Jordan Reviewed-by: Davidlohr Bueso Reviewed-by: Laurent Dufour Reviewed-by: Vlastimil Babka --- include/linux/mmu_notifier.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 736f6918335e..2f462710a1a4 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -277,9 +278,9 @@ mmu_notifier_get(const struct mmu_notifier_ops *ops, struct mm_struct *mm) { struct mmu_notifier *ret; - down_write(&mm->mmap_sem); + mmap_write_lock(mm); ret = mmu_notifier_get_locked(ops, mm); - up_write(&mm->mmap_sem); + mmap_write_unlock(mm); return ret; } void mmu_notifier_put(struct mmu_notifier *subscription); -- 2.26.2.761.g0e0b3e54be-goog