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.3 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 1C95EC433E0 for ; Mon, 18 May 2020 09:28:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB7AE207ED for ; Mon, 18 May 2020 09:28:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB7AE207ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 88AD680005; Mon, 18 May 2020 05:28:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8141D900002; Mon, 18 May 2020 05:28:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7028180005; Mon, 18 May 2020 05:28:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id 58863900002 for ; Mon, 18 May 2020 05:28:55 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1B8A0DB34 for ; Mon, 18 May 2020 09:28:55 +0000 (UTC) X-FDA: 76829315430.19.force92_139a39c417347 X-HE-Tag: force92_139a39c417347 X-Filterd-Recvd-Size: 2908 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 May 2020 09:28:54 +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 6B1F8AFEB; Mon, 18 May 2020 09:28:55 +0000 (UTC) Subject: Re: [PATCH v5 02/10] MMU notifier: use the new mmap locking API To: Michel Lespinasse , Andrew Morton , linux-mm Cc: LKML , Peter Zijlstra , Laurent Dufour , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan , Davidlohr Bueso References: <20200422001422.232330-1-walken@google.com> <20200422001422.232330-3-walken@google.com> From: Vlastimil Babka Message-ID: <3085bc00-c93d-9e2e-3435-726cd39069db@suse.cz> Date: Mon, 18 May 2020 11:28:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200422001422.232330-3-walken@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 4/22/20 2:14 AM, 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 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); >