From patchwork Fri Mar 27 22:50:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Lespinasse X-Patchwork-Id: 11463247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B560A14B4 for ; Fri, 27 Mar 2020 22:51:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 82EBB2071B for ; Fri, 27 Mar 2020 22:51:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Q5nTqhe2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82EBB2071B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 22B9B6B0036; Fri, 27 Mar 2020 18:51:11 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1DB046B0037; Fri, 27 Mar 2020 18:51:11 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F2926B006C; Fri, 27 Mar 2020 18:51:11 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id EC3896B0036 for ; Fri, 27 Mar 2020 18:51:10 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id ABAA85DEB for ; Fri, 27 Mar 2020 22:51:10 +0000 (UTC) X-FDA: 76642639500.09.roll40_447045d1f3149 X-Spam-Summary: 2,0,0,3eddc8c033a88a7a,d41d8cd98f00b204,3xyn-xgykcfgm0ba4d6ee6b4.2ecb8dkn-ccal02a.eh6@flex--walken.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:973:982:988:989:1260:1277:1313:1314:1345:1359:1437:1516:1518:1534:1541:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3152:3351:3865:3866:3870:3871:3872:4321:5007:6261:6653:6742:9010:9969:10004:10400:11026:11658:11914:12043:12296:12297:12438:12555:12895:13069:13311:13357:14096:14097:14181:14394:14659:14721:21080:21433:21444:21451:21627:21990:30054,0,RBL:209.85.215.201:@flex--walken.bounces.google.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:22,LUA_SUMMARY:none X-HE-Tag: roll40_447045d1f3149 X-Filterd-Recvd-Size: 4170 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Mar 2020 22:51:10 +0000 (UTC) Received: by mail-pg1-f201.google.com with SMTP id g10so9153822pgg.9 for ; Fri, 27 Mar 2020 15:51:10 -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=5IcQYYvEOpf9NGuTwGi2Hn9JVgRq+o118uhRqu7k0m0=; b=Q5nTqhe2TmpNAXjMuOUuB4Uul1PuM7N7gC6cL9oRJ6XqGknHjld8NWpjf4F59g4Er/ 7mMqrs8zROG/p95wQKtU11+uzVY27oL2jnpMHh6mpphP9xnFkPuEHuAxVPQtBCiVic6y cQwcwa325EqPKIoGD9UCO3TZnLsZm5sERmIxO7X+9AMWtV1pF34RXf5MyfL5xqacsJMp erbLQ/k75XQ2entldGrbsueScJ8z9lpB+QVHlBLFMTdwCZ7LGxxtw0gnKdKGdyFvtXLr D8JyQrRxkqlgFgMOO472aeSXIywM3Ufj4bWQWvjZe0ikQbdz3DMf7M5BXGRl/mXsb5dF cLEA== 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=5IcQYYvEOpf9NGuTwGi2Hn9JVgRq+o118uhRqu7k0m0=; b=NsvofStwWHwjV5vTJyx3Sy1EByo6AZb178qNvnsAW7zR5iYVJhmP8QJNCxI3kpeqYL 9afDGXWgCgmJ+HmXmbCUBsegyp0G4THTRXMyd+XgvIWAX15WeUFW0lZ3i7eajNn6z5IT Z89bO0aPlgdB2s7UQXuwvBRxzzmIt5PxZULK3r67lRn2ztlV8o3N53fDzd92zKQx8jNV a3ZtLQd+5YKpR24VkV7nt6LFxuMYREf1cWuoxf4y5vbhU23lpXpRJZ26CPJimhj26Y9m PRWbwKTCinYvVHUenPogUBDvMfv7+WkAweZlo7VlcGkpL2FXe30PdxeZEYPye9J2yjjO YHog== X-Gm-Message-State: ANhLgQ20Ew8rQF7Do8iTZNuX+gODXbZT5mrzTFdPlW45XDZ98CcCFp37 JMpWoaYnALU3Yw9l1C9426JP8In/JMM= X-Google-Smtp-Source: ADFU+vtREf0tww1xCyT2LRp9quZ7Qor6eEYHrIW70F5yQHQo8UKHF5iRTEUKyjo9NbytqdyMC06oXER1wBc= X-Received: by 2002:a63:a361:: with SMTP id v33mr1590659pgn.324.1585349469261; Fri, 27 Mar 2020 15:51:09 -0700 (PDT) Date: Fri, 27 Mar 2020 15:50:54 -0700 In-Reply-To: <20200327225102.25061-1-walken@google.com> Message-Id: <20200327225102.25061-3-walken@google.com> Mime-Version: 1.0 References: <20200327225102.25061-1-walken@google.com> X-Mailer: git-send-email 2.26.0.rc2.310.g2932bb562d-goog Subject: [PATCH v3 02/10] 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 , Markus Elfring , Michel Lespinasse 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: 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 --- 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);