Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp49199ybb; Fri, 27 Mar 2020 15:51:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsIiRRmaOBs2yt1LWDStl0V90nh1kJ414AlDIyDk6tXOP2ueb48QlemMhzKTZJZPIPIpCNb X-Received: by 2002:a4a:bf19:: with SMTP id r25mr1427534oop.3.1585349504900; Fri, 27 Mar 2020 15:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585349504; cv=none; d=google.com; s=arc-20160816; b=K9yhIpZAWmzAIcAJXDKpUGnxS2OmYyKswPQr9zfbYY4CNgInuFhxfOE8nZ3ZDB4J/Q WrHAkdEwwAn91I6fvu8Pleb863BLxM35pQlNXttN5hPD8XuDjLDtcxySg23LXfePVJoh JPLsg5NCqLB5i7N+EoF/DRtyvfwclgn9HJ+bQIzzS3LeIs4QvU8MdgzLhRyu1BkV8fex xHSMTXBTEJQhHBppMe9YmjU8/1upfEcSCn9fShAjHKd2ET0fAhZbLspKO1DMemacSWPM 7eyYLuDTP7AQRU1R9db3dsn9GDBu/8l7QpsSLC1apCpjqcvFD73A4SP1e4rNTm1ujLI1 j/RQ== 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=5IcQYYvEOpf9NGuTwGi2Hn9JVgRq+o118uhRqu7k0m0=; b=VTjiHCIJXOoLug+IO6BXTxbEibYUe9tCA3j6pYozOMxPSDgLoBC0zEmVzlc6GvbvWY 2vQFMsfOXCDHwNTmlSLUPvSXX1KpLtv3XKz/KsQzbJUVB+o/+mqUiVe6zj4qZxqcZMwZ Ni11MLcAlMu9vJ82kXb7JNxr8vyW6N6kW7DuBSfigySaJOyopYSRzcHgr1Lpb2kYSRCZ AFLpOOqgl4Nsll5V6wEag+LdnhvLrZDVt0mBeud3ugycnl6ZKUB+x3dl/+RSizgFqrY7 gGzDAxUkvFxdfpDV/KYvbH9XDwPZZtvtr3OOrwHaCdpl1oLOoTX3SydtWGH9T2Hw9B/0 216Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Q5nTqhe2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id m185si2913265oib.102.2020.03.27.15.51.32; Fri, 27 Mar 2020 15:51:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Q5nTqhe2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727751AbgC0WvL (ORCPT + 99 others); Fri, 27 Mar 2020 18:51:11 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:34715 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727718AbgC0WvK (ORCPT ); Fri, 27 Mar 2020 18:51:10 -0400 Received: by mail-pg1-f202.google.com with SMTP id 12so9174927pgv.1 for ; Fri, 27 Mar 2020 15:51:09 -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=PCy7FARKa7do3fleCu9wi+ee4d9M5LKHsmsRJDcD7cBx4wH8190lMc1nyYmG74w85q ALSfk5nsQ87+Us0RrzkYnVy0r+6PiQFPojXW9ClF8dt2FU1hy5GWEWtSxtSr/8t8s3CK 8DlCD2IPmHGNpEZOzHjv08WHtHPZ9XoJgh354A8Ad9JvPAuSS7/l8/CK3zsytkc5c+K0 0jMi20HFOrPtLdkDO4SuaVSQt7deg5uoJ1cLEZIjglUTcDjDjGFn+VJfJQzYMrKq5Dyu XPCDGQXm8QLaA0u/4nHzxLjubalWOOnpfhGAgBKANP0ibj/cICQ+OLVn89v/qre70uKt oTwQ== X-Gm-Message-State: ANhLgQ0lVtKTpkUsp6FIDHN04UT9XULBpbqJUFOqRFghJG7F4oO3UyJ+ KDspecBusFe7Jl0PVVklKOQdeA8/0Lc= 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 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 --- 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.rc2.310.g2932bb562d-goog