mm: add kernel-doc for folio_mark_accessed()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 24 Apr 2024 19:19:11 +0000 (20:19 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:50 +0000 (17:53 -0700)
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>
mm/swap.c

index bfce6d53b2378eb0d5b3cc6273f9cd27c00ac82d..67786cb771305c09e6fd96c03296261e19f0f990 100644 (file)
--- 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)
 {