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/swapfile.c: update the code comment above swap_count_continued()

Now, swap_count_continued() has two callers, __swap_duplicate() and
__swap_entry_free_locked(), the relevant code comment is stale. Update it
to reflect the current situation.

[bhe@redhat.com: v2]
Link: https://lkml.kernel.org/r/Z6V0/UvG1fvkQ4t/@fedora
Link: https://lkml.kernel.org/r/20250205092721.9395-7-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <ryncsn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Baoquan He and committed by
Andrew Morton
f80ddc14 b4735d94

+2 -2
+2 -2
mm/swapfile.c
··· 3797 3797 * into, carry if so, or else fail until a new continuation page is allocated; 3798 3798 * when the original swap_map count is decremented from 0 with continuation, 3799 3799 * borrow from the continuation and report whether it still holds more. 3800 - * Called while __swap_duplicate() or swap_entry_free() holds swap or cluster 3801 - * lock. 3800 + * Called while __swap_duplicate() or caller of __swap_entry_free_locked() 3801 + * holds cluster lock. 3802 3802 */ 3803 3803 static bool swap_count_continued(struct swap_info_struct *si, 3804 3804 pgoff_t offset, unsigned char count)