[PATCH RFC 16/32] mm: convert folio referenced flag usages to new bitwise identical helpers
From: Kairui Song via B4 Relay
Date: Fri May 01 2026 - 17:05:52 EST
From: Kairui Song <kasong@xxxxxxxxxxx>
To prepare for removal of this page flag, use the new introduced
standalone helper.
Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
---
mm/swap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/swap.c b/mm/swap.c
index 6e0397ff881d..2250d9db1395 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -525,8 +525,8 @@ void folio_mark_accessed(struct folio *folio)
return;
}
- if (!folio_test_referenced(folio)) {
- folio_set_referenced(folio);
+ if (!folio_is_referenced_by_bit(folio)) {
+ folio_mark_referenced_by_bit(folio);
} else if (folio_test_unevictable(folio)) {
/*
* Unevictable pages are on the "LRU_UNEVICTABLE" list. But,
@@ -544,7 +544,7 @@ void folio_mark_accessed(struct folio *folio)
folio_activate(folio);
else
__lru_cache_activate_folio(folio);
- folio_clear_referenced(folio);
+ folio_clear_referenced_by_bit(folio);
workingset_activation(folio);
}
if (folio_test_idle(folio))
--
2.54.0