Re: [PATCH v3 12/14] treewide: replace PagePrivate() with page_private()

From: David Hildenbrand (Arm)

Date: Wed Sep 09 2026 - 13:14:26 EST


On 9/8/26 04:56, Zi Yan wrote:
> PG_private is going to be removed and its check is replaced by checking
> page->private != NULL.
>

You should likely clarify here that, for these users (the pages they deal with),
PG_private is set if and only if page->private != NULL. Consequently, there is
no functional change.

> Replace page_buffers() with page_private() and delete page_buffers(),
> since only two users left and both can be converted to use page_private().
>
[...]

> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index 657c2cb0f8811..fad17df1d5082 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -70,9 +70,7 @@ static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned
>
> static inline struct ceph_snap_context *page_snap_context(struct page *page)
> {
> - if (PagePrivate(page))
> - return (void *)page->private;
> - return NULL;
> + return (void *)page->private;
> }

I'd even split this up into 2 (or even 3) patches:

1) Remove PagePrivate usage in ceph

2) Remove PagePrivate usage in md

3) Inline page_buffers() and remove it

Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David