Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp144420ybz; Tue, 21 Apr 2020 17:16:04 -0700 (PDT) X-Google-Smtp-Source: APiQypIBcpwBFDJfYR4v0ygCJrwSQBUVskff1ioTxk6+1nP4mmnb4vK4EfgtK/jTcIZY0ZBu5So7 X-Received: by 2002:a17:906:f1c3:: with SMTP id gx3mr24082349ejb.25.1587514564373; Tue, 21 Apr 2020 17:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587514564; cv=none; d=google.com; s=arc-20160816; b=yiig3pQ3n2+qflKaO5Y1yMYr0g8ozzT7uUECgSxv9DKEpXzVvSBTOqLwj1iJ5wYUCw jpR/ZuTWARlqaX/2h5Kaf+zXTyf8jMU1q0BTAJIPp5f2c+RuT3l0qrQq8YFkghgtukvm 9ZN3GmwxWn5yndYP/Lft3Bj2rokc30klLvmJ94kNAkC/+Xs9NrvYRxMAd8owdZ3grrB2 4/Dx8ikRDsb7XYL9QMiX1ZDy7tgn+4Jd5HYopu9XH82u3qbFcS6PsHOEHEwLj1FTox+D Rrn9+wl297CtMA3ANQCLy+/CBeeH1fHmpwWUspjuvWCgbleN5zUooKYaQiAMWclH6Z5n EUtQ== 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=/xPYX04nKsJiukhQBuhEJ9u68izHM8ZA0ttUVx7HKYQ=; b=ymiD4zh4Q9cUvetXjftraRqt7PSMdblnHkVcnxR+zv+0Fd8pq2ZpZZXrgvFV12baJr +JMdbfQcGv/ZpVvJ1Xk7dQ42lx1JMGyd4y1RrI/mkg7eMHkPwbIUlk42bX7W1pF2rRfF mkwLsJSlEl98Gor4AVZqaGUkcX1OT8GKJb1VEJiwUT4fFHWUpey20M2B0mdDXMxvprtN ZCb18vO3OOAgVhN4I7kpNssFPm8Z6tBFaH4Ty6ZQWJQPYDKxDHFguv+H2QVl6OrsnjF/ IIEja8pfliYjfMaPNZbzFsupPvnGdSzEkioKyeP9zQrBagP1kRecKd5PScdL/2OETkpd RqvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fOCgPjpj; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cf5si2524476ejb.171.2020.04.21.17.15.39; Tue, 21 Apr 2020 17:16:04 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=fOCgPjpj; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbgDVAOe (ORCPT + 99 others); Tue, 21 Apr 2020 20:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbgDVAOa (ORCPT ); Tue, 21 Apr 2020 20:14:30 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31395C0610D5 for ; Tue, 21 Apr 2020 17:14:30 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id l9so152082pjq.8 for ; Tue, 21 Apr 2020 17:14:30 -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=/xPYX04nKsJiukhQBuhEJ9u68izHM8ZA0ttUVx7HKYQ=; b=fOCgPjpjPqfxN/zvti9Uz9F22MJpVgNh2v3q4OjtyOZDSp4ZHvIbKO+bJyTLsueskU 6Rmqq5V27Lx/yqlIkm6H0R1h1NmhLkwtJUghxHRvkrj+vQGMskDR6WrzkQnOIXkHFWsk rxQwkUz6OXvo4ppJrc6ESa+nQR/cEGDvw5IrPT2xJBM3FI8Y+MItUjG92F9hCpPofyCl IC3wFW0btBDWYfDD+Ispzve/ACmrzfDLNkrHePsFoESSKCrhRNinJTHcFUihIjzGWSMV cMgo5U5WpTSaRtbOJLR3n/ArQ7X6KVyC+Hf3Cv56RiiU92ieeplRQ0m8kGxOrywVuFrD +dXA== 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=/xPYX04nKsJiukhQBuhEJ9u68izHM8ZA0ttUVx7HKYQ=; b=r1x2+xdEHSDr7IxCVIlewxrV7s34l7U3iM80qTL66Qvs0WkKj80XOLe+k2jvdsbV4p GNPbM08lVG4SZ843x4aiBjMTQ1DNS8LqLx0Dw4oFYUib8kpTj6QjASUvxRLaOpD+1o/v U5zvWmEOUR2pJ5XIA+T6UhpU/6cfAw08zu+/g4sJt7yfzqvNgf1+NDAlclIvhZYMAd5W RBgiQqWrMu6nCJSQ6QO3eHUBCI9KkyCvgAUcsN1Go6kFQ2W0eFDhJc8BuQswt7rsf/mx +jCFuqxdWWY3J2E9+2kGrPf/sI63PMYYQzhS5JxZLKdsBHq7VRt+qLUrqtxRI7lAYDp/ X6EA== X-Gm-Message-State: AGi0PuYZVLeDUWbBc16gAe8D+XrzVW+K6Lx0c2TceBWeR+Y8ZWB6jrIg LzJ/ZMosJ/EtMASQz85vwwl8LLQsZgg= X-Received: by 2002:a17:90a:d808:: with SMTP id a8mr8408471pjv.6.1587514469596; Tue, 21 Apr 2020 17:14:29 -0700 (PDT) Date: Tue, 21 Apr 2020 17:14:14 -0700 In-Reply-To: <20200422001422.232330-1-walken@google.com> Message-Id: <20200422001422.232330-3-walken@google.com> Mime-Version: 1.0 References: <20200422001422.232330-1-walken@google.com> X-Mailer: git-send-email 2.26.1.301.g55bc3eb7cb9-goog Subject: [PATCH v5 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 , Daniel Jordan , Michel Lespinasse , Davidlohr Bueso 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 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.1.301.g55bc3eb7cb9-goog