On Mon Aug 31, 2026 at 3:25 PM EDT, Zi Yan wrote:
> folio->private != NULL indicates a folio carries private data, replacing
> PG_private. All PG_private users are converted. Remove PG_private and
> reserve the space as __PG_folio for future use.
>
> Also update files in Documentation. hugetlbfs_reserv.rst is outdated and
> left unchanged. It should be rewritten.
>
<snip>
>
> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> index 9b585e68127a2..eb2961ed61018 100644
> --- a/include/linux/page-flags.h
> +++ b/include/linux/page-flags.h
> @@ -44,10 +44,6 @@
> * Consequently, PG_reserved for a page mapped into user space can indicate
> * the zero page, the vDSO, MMIO pages or device memory.
> *
> - * The PG_private bitflag is set on pagecache pages if they contain
> filesystem
> - * specific data (which is normally at page->private). It can be used by
> - * private allocations for its own usage.
> - *
> * During initiation of disk I/O, PG_locked is set. This bit is set before
> I/O
> * and cleared when writeback _starts_ or when read _completes_. PG_writeback
> * is set before writeback starts and cleared when it finishes.
> @@ -105,7 +101,7 @@ enum pageflags {
> PG_owner_2, /* Owner use. If pagecache, fs may use */
> PG_arch_1,
> PG_reserved,
> - PG_private, /* If pagecache, has fs-private data */
> + __PG_folio, /* Do not use: reserved for folio
> identification */
Sashiko asked how to detect leaked filesystem private data during page
free time after PG_private is removed.
Answer copied from RFC:
After the conversion, folio/page should have an elevated refcount whenever
->private is set. That would help detect leaked private data. I tried to
enforce ->private needs to be NULL at page free time[1], but that might
cause trouble for certain use cases.
[1] https://lore.kernel.org/all/[email protected]/
--
Best Regards,
Yan, Zi