Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2573814ybk; Mon, 18 May 2020 02:31:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt1SDAsOaPnti0yPNwNSiogu/utmhlmTm3tyJIKzYrI1CzDuPFjiXaxmj2AAGLMp3r+bpB X-Received: by 2002:a17:906:cd08:: with SMTP id oz8mr13728003ejb.90.1589794313123; Mon, 18 May 2020 02:31:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589794313; cv=none; d=google.com; s=arc-20160816; b=CtBdHE5iQY46kWP523LPqnY7qa/vwm63gtqEpIZzkOnDMspJJJrd8S73ROIZ6xjBve bL/etfHPwBthuTyaiQoBmd4RYjRJlj03uFQnMVnFdZ2KTWfLeFdY75aXUSXVIk7K6UCt htchfpG7eoxKOo/8iSOYob5S+wZgV+ZoCDcTZAokI9EA1WOAAV9SQSluP+mx/Y/vE1SX 3yAapiqn9WsGql3lJFdjEwVLv9p1Ms13XAv8Mc4YN9/wToa2XV92xE0Yd708mWMsGkuV 0UNFHTFH0uHcJ6eii/GnmOqDChxGPfXiplp9o/O4+UWZGT7xFUCfILpX6/Cztt+cU315 RHNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=AJdOceNudMqn1HclTXp+BsFVBP0z7qoGNg4y6FFOPUU=; b=kVb7LHNZunEyahVQ7pqZ/68GJgV//VpXtJw30XHz6Bwlf9bY5tkVLjIXUVUnb0SBxG NHNXYy2+Bn7saW8QZNf3C8mHZmTufzXentzj+QYS/W7Ij4IqSHmtG6JoDE8rzOYo1yQe sU0L3LMRY+SEwHcX/mPD2uhtljiJrXqyjDBmBJtpZReYEUfSO6u8dDl9umDA3inaADlI bNP5RWFmzWMv1StYY/E/UQcAss7xMCyDnPmodYm6LQx4oQoUkO2tFf/l4ytz/5/QkV+9 0vxHGly2+TshnYPBm+XEoXJ+yEer5TkffImhSMc9/rElcyuc/QIMjQBjt+koYm4nqA/7 uUGw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si4770428edr.580.2020.05.18.02.31.29; Mon, 18 May 2020 02:31:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726676AbgERJ2y (ORCPT + 99 others); Mon, 18 May 2020 05:28:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:43806 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbgERJ2y (ORCPT ); Mon, 18 May 2020 05:28:54 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); >