From nobody Sun Feb 8 19:48:27 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9542AEB64DC for ; Tue, 18 Jul 2023 01:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbjGRBVI (ORCPT ); Mon, 17 Jul 2023 21:21:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjGRBVG (ORCPT ); Mon, 17 Jul 2023 21:21:06 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA102A6 for ; Mon, 17 Jul 2023 18:21:03 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4R4h3b6t13z4f3nJy for ; Tue, 18 Jul 2023 09:20:59 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP1 (Coremail) with SMTP id cCh0CgCnxzH76LVkVp7ZNQ--.10531S2; Tue, 18 Jul 2023 09:21:00 +0800 (CST) From: Kemeng Shi To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH] mm/rmap: correct stale comment of rmap_walk_anon and rmap_walk_file Date: Tue, 18 Jul 2023 17:21:36 +0800 Message-Id: <20230718092136.1935789-1-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: cCh0CgCnxzH76LVkVp7ZNQ--.10531S2 X-Coremail-Antispam: 1UD129KBjvJXoW7ZrWfCF4kuw17Kw43Aw1fZw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List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 1. update page to folio in comment 2. add comment of new added @locked Signed-off-by: Kemeng Shi Reviewed-by: David Hildenbrand Reviewed-by: Matthew Wilcox (Oracle) --- mm/rmap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 2668f5ea3534..1c0538fbb8f2 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -2402,11 +2402,12 @@ static struct anon_vma *rmap_walk_anon_lock(struct = folio *folio, /* * rmap_walk_anon - do something to anonymous page using the object-based * rmap method - * @page: the page to be handled + * @folio: the folio to be handled * @rwc: control variable according to each walk type + * @locked: caller holds relevant rmap lock * - * Find all the mappings of a page using the mapping pointer and the vma c= hains - * contained in the anon_vma struct it points to. + * Find all the mappings of a folio using the mapping pointer and the vma + * chains contained in the anon_vma struct it points to. */ static void rmap_walk_anon(struct folio *folio, struct rmap_walk_control *rwc, bool locked) @@ -2450,10 +2451,11 @@ static void rmap_walk_anon(struct folio *folio, =20 /* * rmap_walk_file - do something to file page using the object-based rmap = method - * @page: the page to be handled + * @folio: the folio to be handled * @rwc: control variable according to each walk type + * @locked: caller holds relevant rmap lock * - * Find all the mappings of a page using the mapping pointer and the vma c= hains + * Find all the mappings of a folio using the mapping pointer and the vma = chains * contained in the address_space struct it points to. */ static void rmap_walk_file(struct folio *folio, --=20 2.30.0