summaryrefslogtreecommitdiffstats
path: root/mm/swap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-04-24 21:19:11 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-05-06 02:53:50 +0200
commit21db296aaf5cb6d5477697088db025f8e42345c1 (patch)
treeb55b078b80972bf1a088449f30459b6355d97759 /mm/swap.c
parentgup: use folios for gup_devmap (diff)
downloadlinux-21db296aaf5cb6d5477697088db025f8e42345c1.tar.xz
linux-21db296aaf5cb6d5477697088db025f8e42345c1.zip
mm: add kernel-doc for folio_mark_accessed()
Convert the existing documentation to kernel-doc and remove references to pages. Link: https://lkml.kernel.org/r/20240424191914.361554-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap.c')
-rw-r--r--mm/swap.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mm/swap.c b/mm/swap.c
index bfce6d53b237..67786cb77130 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -447,15 +447,18 @@ static void folio_inc_refs(struct folio *folio)
}
#endif /* CONFIG_LRU_GEN */
-/*
- * Mark a page as having seen activity.
+/**
+ * folio_mark_accessed - Mark a folio as having seen activity.
+ * @folio: The folio to mark.
+ *
+ * This function will perform one of the following transitions:
*
- * inactive,unreferenced -> inactive,referenced
- * inactive,referenced -> active,unreferenced
- * active,unreferenced -> active,referenced
+ * * inactive,unreferenced -> inactive,referenced
+ * * inactive,referenced -> active,unreferenced
+ * * active,unreferenced -> active,referenced
*
- * When a newly allocated page is not yet visible, so safe for non-atomic ops,
- * __SetPageReferenced(page) may be substituted for mark_page_accessed(page).
+ * When a newly allocated folio is not yet visible, so safe for non-atomic ops,
+ * __folio_set_referenced() may be substituted for folio_mark_accessed().
*/
void folio_mark_accessed(struct folio *folio)
{