Re: [PATCH RFC 10/14] mm/page-flags: introduce folio_test_fs_private()
From: Zi Yan
Date: Wed Aug 12 2026 - 16:01:46 EST
On Fri Jul 31, 2026 at 10:13 PM EDT, Zi Yan wrote:
> folio_test_fs_private() wraps folio->private != NULL check and excludes
> swapcache and hugetlb folios, since swapcache uses swp_entry_t overlapping
> with folio->private and hugetlb sets its own flags in folio->private.
> Replace open code with the helper, since core MM does this check
> frequently.
>
> No functional change intended.
>
> Assisted-by: Claude:claude-opus-4-8
> Assisted-by: Codex:gpt-5
> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
> To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> To: David Hildenbrand <david@xxxxxxxxxx>
> To: Steven Rostedt <rostedt@xxxxxxxxxxx>
> To: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
> To: Lorenzo Stoakes <ljs@xxxxxxxxxx>
> Cc: "Liam R. Howlett" <liam@xxxxxxxxxxxxx>
> Cc: Vlastimil Babka <vbabka@xxxxxxxxxx>
> Cc: Mike Rapoport <rppt@xxxxxxxxxx>
> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxx>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
> Cc: Zi Yan <ziy@xxxxxxxxxx>
> Cc: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
> Cc: Nico Pache <nico.pache@xxxxxxxxx>
> Cc: Ryan Roberts <ryan.roberts@xxxxxxx>
> Cc: Dev Jain <dev.jain@xxxxxxx>
> Cc: Barry Song <baohua@xxxxxxxxxx>
> Cc: Lance Yang <lance.yang@xxxxxxxxx>
> Cc: Usama Arif <usama.arif@xxxxxxxxx>
> Cc: Matthew Brost <matthew.brost@xxxxxxxxx>
> Cc: Joshua Hahn <joshua.hahnjy@xxxxxxxxx>
> Cc: Rakie Kim <rakie.kim@xxxxxx>
> Cc: Byungchul Park <byungchul@xxxxxx>
> Cc: Gregory Price <gourry@xxxxxxxxxx>
> Cc: Ying Huang <ying.huang@xxxxxxxxxxxxxxxxx>
> Cc: Alistair Popple <apopple@xxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: linux-fsdevel@xxxxxxxxxxxxxxx
> Cc: linux-mm@xxxxxxxxx
> Cc: linux-trace-kernel@xxxxxxxxxxxxxxx
> ---
> fs/proc/page.c | 3 +--
> include/linux/mm.h | 3 +--
> include/linux/page-flags.h | 21 ++++++++++++++++++---
> include/trace/events/pagemap.h | 4 +---
> mm/huge_memory.c | 4 +---
> mm/migrate.c | 3 +--
> 6 files changed, 23 insertions(+), 15 deletions(-)
>
Sashiko pointed out that I missed a couple of open coded checks. I will
replace them with folio_test_fs_private() in v2.
--
Best Regards,
Yan, Zi