From: Baoquan He Date: Wed, 5 Feb 2025 09:27:10 +0000 (+0800) Subject: mm/swap_state.c: fix the obsolete code comment X-Git-Tag: v6.15-rc1~81^2~378 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81fe88a946051f1dceef72fb3f87bb0880392464;p=thirdparty%2Fkernel%2Flinux.git mm/swap_state.c: fix the obsolete code comment Patch series "Tiny cleanup and improvements about SWAP code". These are all made during review and from reading the patchset "[PATCH v3 00/13] mm, swap: rework of swap allocator locks" from Kairui. This patch (of 12): Since commit 85a1333417a7 ("mm/swap: use dedicated entry for swap in folio"), there's a dedicated field in folio for swap entry. Let's update the code comment above add_to_swap_cache() accordingly. Link: https://lkml.kernel.org/r/20250205092721.9395-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20250205092721.9395-2-bhe@redhat.com Signed-off-by: Baoquan He Reviewed-by: Kairui Song Cc: Baoquan he Cc: Chris Li (Google) Signed-off-by: Andrew Morton --- diff --git a/mm/swap_state.c b/mm/swap_state.c index 2e1acb210e575..aabde86d1f47e 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -85,7 +85,7 @@ void *get_shadow_from_swap_cache(swp_entry_t entry) /* * add_to_swap_cache resembles filemap_add_folio on swapper_space, - * but sets SwapCache flag and private instead of mapping and index. + * but sets SwapCache flag and 'swap' instead of mapping and index. */ int add_to_swap_cache(struct folio *folio, swp_entry_t entry, gfp_t gfp, void **shadowp)