[PATCH RFC 17/32] mm/shmem: mark folio as referenced use new helper
From: Kairui Song via B4 Relay
Date: Fri May 01 2026 - 17:11:02 EST
From: Kairui Song <kasong@xxxxxxxxxxx>
Shmem will mark a new allocated folio as referenced for a write request,
convert it to use the new helper. Stay atomic as the folio, although
being locked, is already in shmem mapping and could be sharely used or
even have its flags field modified by others.
Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
---
mm/shmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index bab3529af23c..2aed99c9f70e 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2595,7 +2595,7 @@ static int shmem_get_folio_gfp(struct inode *inode, pgoff_t index,
}
if (sgp == SGP_WRITE)
- folio_set_referenced(folio);
+ folio_mark_referenced(folio);
/*
* Let SGP_FALLOC use the SGP_WRITE optimization on a new folio.
*/
--
2.54.0