Message ID | c1dbbc9022c9d8d4736d1751678076a2afa1366f.1724226076.git.zhengqi.arch@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31717C52D6F for <linux-arm-kernel@archiver.kernel.org>; Wed, 21 Aug 2024 08:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GHfDnFSOmlgsN5ypR9SiqdvWOZgzK74sPfUFdgGElDM=; b=tXsWWEkofpUVqR52JPObchJQxN AI8AAUeKfg8QDc9ErgtGXTEruTNkpvRgRFvGzoUfWGqYOi74yVfwvWCwUlZHOCpd+pp85Vr5SVct7 zYGEbOETs7EvPopFfN9XsmhunSC7N8rW0mFouzilXsy0kWRIXOs4r0RGmITCjvWYlxt4mQmxCgttp YMuyfMQqBYrOy8+Yjnf06NvCMrJTomUID5GI1dga9D1rvmFq5NZYbWT9WkTci+ETQL3xrZP9PjdvE zCV4nbLQRPZXugoI55JwhNgrdJBfNzP2tqcjr2UuBgmN7/0EUxiltxRiyaLLIcX2W19/A+nNh8vB1 DRTiZUig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggcb-000000082o3-2TBT; Wed, 21 Aug 2024 08:23:13 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sggZN-000000081q6-2hzg for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 08:19:54 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-7a18ba4143bso4177807a12.2 for <linux-arm-kernel@lists.infradead.org>; Wed, 21 Aug 2024 01:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1724228392; x=1724833192; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GHfDnFSOmlgsN5ypR9SiqdvWOZgzK74sPfUFdgGElDM=; b=kFXXLpgg/2BSSdlJZSXyhd/D8dDO0ONegEPNw0/i7FxfV15Bk7EXW0oZK7pSocEIL5 YBPvbBvdroGm0T8IwdAPp8yoaORVfNadZ3xyz8w8j+jgCG3YzRZ4EfTOUpQLS+dRH5Ju 9xSJv7YbQyHT62xd73XAKM45AnURtr0W7PxzTc6dy0Aah7TxlG5waqOocg5LUI+u1MBq MGoXp4Ws9tki9w6p2C2geFhGj9BcCui1gq6tVdskBRZ8/0WBK6T8okTEcSGiBPmHPiHp iOMoYKqYIFy4lneJt8hXJ0E3qKhUC8iB+Nls1SJmXoYZSmgdLqpm7k1Ta6HKNeedykVM 6N0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724228392; x=1724833192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GHfDnFSOmlgsN5ypR9SiqdvWOZgzK74sPfUFdgGElDM=; b=ucSmblfkIeE42VQgAB3kjOk7C9O9FeZiabVZfTrjeNP7dd+0zRh20SHZfBMRn5qR5I ghmJV9DQXcdPor9kVQOEuCnX34PZfmXKY4ZXdpxVke+cMNAO3zDz8wWQf4dnXtN9FWab jWPkvXgo2z1JyaUygpwoBfxMU2EbJKvtwEim5MfRNwHjj6R4Myz5VqF9Eg/fyAbodcur uy7DBnWtdzXFzKaX5YByI/WVC8+HX0eEVR+HiACtyZYXpBV+6tPbMK3Jd1R/hB0mKU7b ih+e54SqjlRsGxYgQuw83peVaYlKTbAb7M4Zo6mE7Fo11WkSLhmWWMArgd3Vy/K/9YqR c6Cg== X-Forwarded-Encrypted: i=1; AJvYcCV8Z0uDG3xOmNQ5HuJ1BXFrgA/YqqqqIrhekrFwufjrSbdD+VkESZIsFcavZDvyi0oMNc2FPxNQaLBCscS+CClb@lists.infradead.org X-Gm-Message-State: AOJu0YwSHy0iJyAQ5HJDiJR72qWZYU4btls8QjMq4GR+KgkFjeEQX3em 6iSrtPttj82+Av9mJhT6JsHoxaGhWVwIeAic8Ww4HWi5cgMufXarz8NuziJYDHc= X-Google-Smtp-Source: AGHT+IEDKdhDrkAt8Xw9HjhxvAn16yLBj0ykk9gzeBgjUCoqqbqdejlnt+3gntiVrRuxkT/2XR+s6w== X-Received: by 2002:a17:90a:d98e:b0:2c2:c149:ca4 with SMTP id 98e67ed59e1d1-2d5eaa9d141mr1321075a91.43.1724228392525; Wed, 21 Aug 2024 01:19:52 -0700 (PDT) Received: from C02DW0BEMD6R.bytedance.net ([203.208.167.150]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d5eb9049b0sm1091453a91.17.2024.08.21.01.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 01:19:52 -0700 (PDT) From: Qi Zheng <zhengqi.arch@bytedance.com> To: david@redhat.com, hughd@google.com, willy@infradead.org, muchun.song@linux.dev, vbabka@kernel.org, akpm@linux-foundation.org, rppt@kernel.org, vishal.moola@gmail.com, peterx@redhat.com, ryan.roberts@arm.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Qi Zheng <zhengqi.arch@bytedance.com> Subject: [PATCH 04/14] mm: filemap: filemap_fault_recheck_pte_none() use pte_offset_map_readonly_nolock() Date: Wed, 21 Aug 2024 16:18:47 +0800 Message-Id: <c1dbbc9022c9d8d4736d1751678076a2afa1366f.1724226076.git.zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <cover.1724226076.git.zhengqi.arch@bytedance.com> References: <cover.1724226076.git.zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_011953_689735_7B82A4F6 X-CRM114-Status: GOOD ( 11.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
introduce pte_offset_map_{readonly|maywrite}_nolock()
|
expand
|
diff --git a/mm/filemap.c b/mm/filemap.c index d87c858465962..491eb92d6db1f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3228,8 +3228,8 @@ static vm_fault_t filemap_fault_recheck_pte_none(struct vm_fault *vmf) if (!(vmf->flags & FAULT_FLAG_ORIG_PTE_VALID)) return 0; - ptep = pte_offset_map_nolock(vma->vm_mm, vmf->pmd, vmf->address, - &vmf->ptl); + ptep = pte_offset_map_readonly_nolock(vma->vm_mm, vmf->pmd, + vmf->address, &vmf->ptl); if (unlikely(!ptep)) return VM_FAULT_NOPAGE;
In filemap_fault_recheck_pte_none(), we just do pte_none() check, so convert it to using pte_offset_map_readonly_nolock(). Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com> --- mm/filemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)