Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1997980ybb; Thu, 26 Mar 2020 19:12:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvu/1tzc4c34s//9DIvash2LS/cmWlLTIIhE3ShX3tEAwTP+p8zOfa3omYPukBtP3jDlQBA X-Received: by 2002:a9d:567:: with SMTP id 94mr7994120otw.201.1585275123137; Thu, 26 Mar 2020 19:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585275123; cv=none; d=google.com; s=arc-20160816; b=kiZp7AcTnG1utlUuVeAzI+lyK/e3BRLqiY7IfX8BdeEdDi35FRQrswXA7HJtjATdrs iQO8A2KF2uTxa7MmpMjF1LNh88RUU3HVqBB0NXQjlIcy+YXThmvNIVTzFIasDu4c8Son 8IBK/ftz/p8UIbT4XmD2XwMNCSwRw+9/8bYcRWbn3KmyYrZDREdVN94P6N8gQaTbDwvx iWqZfuDYUvI6LUrNrUdI0Eqrwe6fQfeSIS42d/3IOTpZb4tYbd1dn9HgXZSrmR9hPE+Q hQQ+ERYvImTYxwtsmzfuAsMmIxnv0pgQcFyy0T88wHepmNpUDaf9JgFq5bHOtvLtKoid 0FwA== 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=bRFJP62810eyRYBUU/VlRziPF0KnA3gvdFS0kYq7uReWVAxLfmsVw0oRbObPChyFCG GHDL6Eu7FIPNGv09kJLc8P0ElEX9JEI6HOgSzy8zHQNDaYowBOdHQoASqvH+3WLKFXrg as+CtXuCjqVCySHJb1xIAiNSBmOa7FnLIBQ8vHiuZM2exV0anHiLwNEGotrwQwC36Lg/ jNQIF2OIY9KHgiN0jh4EgCc5OyP5WRnJpq/Ix5t59xAVqKkNqWqQdgoJSB0JLMJ9Xc/z FeIef0hbvCn0ShzAFSsRaCOdzTypoRRQCLG7eHve+7oPTZhQ4uQCFLzjN8qnFKlykDv1 0kCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nd1CtBFc; 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 z23si1683890oos.54.2020.03.26.19.11.35; Thu, 26 Mar 2020 19:12:03 -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=nd1CtBFc; 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 S1727750AbgC0CLH (ORCPT + 99 others); Thu, 26 Mar 2020 22:11:07 -0400 Received: from mail-pj1-f74.google.com ([209.85.216.74]:54388 "EHLO mail-pj1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727708AbgC0CLH (ORCPT ); Thu, 26 Mar 2020 22:11:07 -0400 Received: by mail-pj1-f74.google.com with SMTP id p14so6207002pjo.4 for ; Thu, 26 Mar 2020 19:11:06 -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=nd1CtBFcTZEGQcDkT14QoA4Yt3oF33FVgLCEDBR2Q7ayEh/pg5mxeQei8Hq6Qn/fQN dnvae75F9n2TtcYdf4RCvvHCcmR8c4+8qU/cTzfGkGlswnCmlgVaWb3zeCV/UmRCOThK ffEw6O7z9sjLvRugSKN6fwq2aWH93kF22ftaeZBjBrBN8bVVTSaBSNj6b+EuPcoaS0Bc qYL103D7NSB5dr8XVVEIOJzQtuRRSqJSfW0sAIWuExMN26s2VyTogQwN2Ulb+bgyQzUq 6XW+y6ZMN2ev1vLcSUTw7Q1PT5IbehalfTH0WflgQfqJgCwpW8WXF/OpN84zvj5v+39c jqwg== 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=H6/R/JimwXu/ehbJxQZLZRkE/tPRoclGZM1p+NJnVuyjqVDaBUZxlUfzjuhrvVbW3W ELhI+rPQInFR5qHM6Z8JI1Dn8LAvIoeVGWFkeD7tWAzvsqusxa9zNHhaCylnn31lD2jG +9jEu7BLYqzb59ltNP04Ogtqlbl4BQfIs6910lfqVw2uUago/vjCmeb41jjYNuMJga+/ mvELLGaAW2gl5hRrMrSKur3oRkovagYRoIIOet8Q0bLKFqojTGfJZteQmhz9YSrVT1V2 1pPTpVYm0pXC0ITonPG+cFTM8U9sZa4GMIdQvOoA+UhELfVgHkAJii0C0QSyszT43b5I 8BIw== X-Gm-Message-State: ANhLgQ2CNrPr4gpIQWdAUtldJby7wJopPsbVhaJDpoCaIB6wk7SQBeGc dGDQ8a4fUhxXJ9G7bkzVeU+M14mt4/I= X-Received: by 2002:a17:90a:264f:: with SMTP id l73mr3221253pje.92.1585275065886; Thu, 26 Mar 2020 19:11:05 -0700 (PDT) Date: Thu, 26 Mar 2020 19:10:50 -0700 In-Reply-To: <20200327021058.221911-1-walken@google.com> Message-Id: <20200327021058.221911-3-walken@google.com> Mime-Version: 1.0 References: <20200327021058.221911-1-walken@google.com> X-Mailer: git-send-email 2.26.0.rc2.310.g2932bb562d-goog Subject: [PATCH v2 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