From: Baoquan He Date: Wed, 5 Feb 2025 09:27:15 +0000 (+0800) Subject: mm/swapfile.c: update the code comment above swap_count_continued() X-Git-Tag: v6.15-rc1~81^2~373 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f80ddc148ca6505060fbef6f8365ca151103e16f;p=thirdparty%2Fkernel%2Flinux.git 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 Cc: Chris Li Cc: Kairui Song Signed-off-by: Andrew Morton --- diff --git a/mm/swapfile.c b/mm/swapfile.c index 0a9c1efeffd6a..08debaacbbc09 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3797,8 +3797,8 @@ outer: * into, carry if so, or else fail until a new continuation page is allocated; * when the original swap_map count is decremented from 0 with continuation, * borrow from the continuation and report whether it still holds more. - * Called while __swap_duplicate() or swap_entry_free() holds swap or cluster - * lock. + * Called while __swap_duplicate() or caller of __swap_entry_free_locked() + * holds cluster lock. */ static bool swap_count_continued(struct swap_info_struct *si, pgoff_t offset, unsigned char count)