From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02E1AC54FCF for ; Mon, 20 Apr 2020 19:54:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6974206A1 for ; Mon, 20 Apr 2020 19:54:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6974206A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6FE028E0005; Mon, 20 Apr 2020 15:54:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6AE3C8E0003; Mon, 20 Apr 2020 15:54:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C3A18E0005; Mon, 20 Apr 2020 15:54:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0064.hostedemail.com [216.40.44.64]) by kanga.kvack.org (Postfix) with ESMTP id 42DBB8E0003 for ; Mon, 20 Apr 2020 15:54:42 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E4FBE4826 for ; Mon, 20 Apr 2020 19:54:41 +0000 (UTC) X-FDA: 76729285962.10.death25_46119528dd149 X-HE-Tag: death25_46119528dd149 X-Filterd-Recvd-Size: 3355 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Apr 2020 19:54:41 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CE4BDAB5F; Mon, 20 Apr 2020 19:54:38 +0000 (UTC) Date: Mon, 20 Apr 2020 12:51:12 -0700 From: Davidlohr Bueso To: Michel Lespinasse Cc: Andrew Morton , linux-mm , LKML , Peter Zijlstra , Laurent Dufour , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan Subject: Re: [PATCH v4 02/10] MMU notifier: use the new mmap locking API Message-ID: <20200420195112.uy7xb4d4kltp6cnz@linux-p48b> Mail-Followup-To: Michel Lespinasse , Andrew Morton , linux-mm , LKML , Peter Zijlstra , Laurent Dufour , Vlastimil Babka , Matthew Wilcox , Liam Howlett , Jerome Glisse , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan References: <20200415004353.130248-1-walken@google.com> <20200415004353.130248-3-walken@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200415004353.130248-3-walken@google.com> User-Agent: NeoMutt/20180716 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 14 Apr 2020, Michel Lespinasse wrote: >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 >--- > 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.0.110.g2183baf09c-goog >