Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <bhe@redhat.com>
Reviewed-by: Kairui Song <kasong@tencent.com>
Cc: Baoquan he <bhe@redhat.com>
Cc: Chris Li <chrisl@kernel.org> (Google)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Baoquan He and committed by
Andrew Morton
81fe88a9 33c9b01e

+1 -1
+1 -1
mm/swap_state.c
··· 85 85 86 86 /* 87 87 * add_to_swap_cache resembles filemap_add_folio on swapper_space, 88 - * but sets SwapCache flag and private instead of mapping and index. 88 + * but sets SwapCache flag and 'swap' instead of mapping and index. 89 89 */ 90 90 int add_to_swap_cache(struct folio *folio, swp_entry_t entry, 91 91 gfp_t gfp, void **shadowp)