Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1427382ybb; Thu, 26 Mar 2020 00:04:12 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvIjTTgfRApnFY7lRias1+0t/yOBBSy2Mxn9evA6QIPrKzj6r6p93lKiW6xPAY/RdQqnV+H X-Received: by 2002:a05:6830:2421:: with SMTP id k1mr5274120ots.192.1585206252702; Thu, 26 Mar 2020 00:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585206252; cv=none; d=google.com; s=arc-20160816; b=XgCOrUyrccMQb38lSdLH35idwhVeSXR5mFQapZfvYp4wHMBRPY+j8PfslU6lz1dLC7 GFFNwXZvJ9yXyBdVKiLaHMT9wCw5ImyGd1ZSVYK7RrLDvQ7g9EpMPVeO2JzEI0gbFaMv t27QXNvU/OBG2bqzQLFIZLYnbsiE/Bx0VoYiWnxm8dhISgi14EbI/XOneLtxR4ohWIoO AoKAs9YBe0laInOcnzsqX3e6OJmC4hFqlvb2Q5k4VVznJD4CKUBeTdwfQ2LzxpWRcNjL KYiT6TGKNcTog280cmgcD34Ef3REcsqMc9WJDHjL7HX70gQoiTDTk7EYHebOoD5yrgpv VbQg== 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=nanV+r4IHUqeQck6GgJYnAFKZtppjERc1ou3yY6xyBw=; b=L3BnHWR6apzKRR+xw3dXcQBVdwCJepwB7DhX/ABVulEQNWX+KW90vPFtyemqyt+BSI BjTbO7KRAEb2Q4yCf0HM/MuF3hvOFPmEaMzLOoKHHqlHYGeKilF9Qw2MAQ5hKpDJiR1g 45iH9j9yf3D1lZ9/pig8S0SRpp+8jRMCwVCzJrDPzXI8n+uajzXfwzwNI71w5HXFRLs1 sufihfVnerOEi7Lp6fM9ZrZRy1MuvQphbcVd6+IbY14bih0k2+g5VikZ1Z0t6rWiBhgE +DgMWctBYFeHt/0D4XxiKiIMDpMGGyl7zKgY0tgvjQDk3aWhzvoBQHIRTkhirPs1oXRi 7eLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LmUQdBDe; 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 v7si722147otp.43.2020.03.26.00.04.00; Thu, 26 Mar 2020 00:04:12 -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=LmUQdBDe; 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 S1727688AbgCZHCr (ORCPT + 99 others); Thu, 26 Mar 2020 03:02:47 -0400 Received: from mail-pg1-f201.google.com ([209.85.215.201]:33261 "EHLO mail-pg1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgCZHCq (ORCPT ); Thu, 26 Mar 2020 03:02:46 -0400 Received: by mail-pg1-f201.google.com with SMTP id 33so4028161pgn.0 for ; Thu, 26 Mar 2020 00:02:44 -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=nanV+r4IHUqeQck6GgJYnAFKZtppjERc1ou3yY6xyBw=; b=LmUQdBDejAspO3PcKB4zLsQohmBqVwbHT1UyMB4iIUpqCUBTZzktu8nyeHvZTaA0hk oNcJc8OCZPgCQYxD8S3se5Z/E7sNU55V4gpf3s1nQW25tLvnWaQ5YBqve2cWOWHkS+aG Em39wZpEZR5j1YccH3IFocIDstDiIZLbDk7eMXJUGSDMqexG99DNX0yEYA/xi7i/czs6 +u8luaxJgpwJI+KkhuaQPzaMEAqA1PhH4+MznL3LfX/vUMVivuDTeZRIkYG/5h/hHDE0 n1Bo5gVT9ckfPbuTfj2cHU1u9W78Rm7Wa7GKt3guIrHNQSg85+W+CKfC2WIxiTHhwdag /yww== 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=nanV+r4IHUqeQck6GgJYnAFKZtppjERc1ou3yY6xyBw=; b=G+Jr0+lq/gCBNuuMAXPcsqLyCItxTIm8Wj9zVm0KUnh6g9IEEtUCWfMHkykZU5YRA9 MBr7c7qjHGVZzOfsexw6ERYLo3SQMI3V+RjrE9yZpBLiSPGcec1JwcQfgHdSs96cND+i wPyoUm7wMtbZ9erXmQrOpvQ0ThuIwgBahWdUTTO34SHXkL5U5iJqUj75VjFpM6Za18/b Z5RmXrM1oQMhPbHnF33P0tH+rX2BTc8IhVuGmSiqfK8Pwgj51FlJkoDGs1fPCXwW3RXt BmHXMpH99pTXJs49XS3SW2gDdSkWgOKETgss1If+5DUw6PHovowRGQ0GMhJFO56/R9BY 2XEw== X-Gm-Message-State: ANhLgQ3t4z7q+WeYbDRi4IRcLT6C9AGdd0kIp6iWFIQ2GjGmZrG+/hRZ xdbbFKTINkwPxRFGDmRSFgVMA4ljcKc= X-Received: by 2002:a63:1517:: with SMTP id v23mr6799206pgl.89.1585206163502; Thu, 26 Mar 2020 00:02:43 -0700 (PDT) Date: Thu, 26 Mar 2020 00:02:30 -0700 In-Reply-To: <20200326070236.235835-1-walken@google.com> Message-Id: <20200326070236.235835-3-walken@google.com> Mime-Version: 1.0 References: <20200326070236.235835-1-walken@google.com> X-Mailer: git-send-email 2.25.1.696.g5e7596f4ac-goog Subject: [PATCH 2/8] 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 , 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.25.1.696.g5e7596f4ac-goog