summaryrefslogtreecommitdiff
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2025-02-05 17:27:15 +0800
committerAndrew Morton <akpm@linux-foundation.org>2025-03-16 22:06:06 -0700
commitf80ddc148ca6505060fbef6f8365ca151103e16f (patch)
tree4ee5e192246266aaa6b4dc3ae258118a33a4a3fa /mm/swapfile.c
parentb4735d94c29f6a65362d3cce0d55aa65e0e319e3 (diff)
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>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 0a9c1efeffd6..08debaacbbc0 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)