* [PATCH] erofs: use page_private() in z_erofs_is_shortlived_page()
@ 2026-11-24 3:37 Nilay Vaish
2026-11-28 4:11 ` Gao Xiang
0 siblings, 1 reply; 2+ messages in thread
From: Nilay Vaish @ 2026-11-24 3:37 UTC (permalink / raw)
To: Gao Xiang
Cc: Chao Yu, Yue Hu, Jingbo Xu, Sandeep Dhavale, Hongbo Li,
Chunhai Guo, linux-erofs, Nilay Vaish
Short-lived pages are marked with set_page_private(), but
z_erofs_is_shortlived_page() tests the marker by reading page->private
directly.
struct page is being shrunk as part of the memdesc work, and its private
field is one of those that will move. Direct users have to go through
the accessors before that can happen.
Read the marker with page_private(), to match how it is set.
No functional change.
Signed-off-by: Nilay Vaish <nilayvaish@google.com>
---
Notes:
This patch was written with the help of an AI coding assistant (Gemini).
Based on next-20261123.
fs/erofs/compress.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/erofs/compress.h b/fs/erofs/compress.h
index 84c8e52581f4..a9ff02b443a8 100644
--- a/fs/erofs/compress.h
+++ b/fs/erofs/compress.h
@@ -41,7 +41,7 @@ struct z_erofs_decompressor {
*/
static inline bool z_erofs_is_shortlived_page(struct page *page)
{
- return page->private == Z_EROFS_SHORTLIVED_PAGE;
+ return page_private(page) == Z_EROFS_SHORTLIVED_PAGE;
}
static inline bool z_erofs_put_shortlivedpage(struct page **pagepool,
base-commit: 3191063649dbf7c0d0b768e1f3655e4c5fc6edb5
prerequisite-patch-id: d52d42a2ec9ddc2b12b3412ec0d07254b417e60f
prerequisite-patch-id: d8338f943ba7ae297eefbb26dabc3bcfe7994461
--
2.56.1.839.g22a8290db9-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] erofs: use page_private() in z_erofs_is_shortlived_page()
2026-11-24 3:37 [PATCH] erofs: use page_private() in z_erofs_is_shortlived_page() Nilay Vaish
@ 2026-11-28 4:11 ` Gao Xiang
0 siblings, 0 replies; 2+ messages in thread
From: Gao Xiang @ 2026-11-28 4:11 UTC (permalink / raw)
To: Nilay Vaish
Cc: Gao Xiang, Chao Yu, Yue Hu, Jingbo Xu, Sandeep Dhavale, Hongbo Li,
Chunhai Guo, linux-erofs
On Mon, Nov 23, 2026 at 07:37:01PM -0800, Nilay Vaish wrote:
> Short-lived pages are marked with set_page_private(), but
> z_erofs_is_shortlived_page() tests the marker by reading page->private
> directly.
>
> struct page is being shrunk as part of the memdesc work, and its private
> field is one of those that will move. Direct users have to go through
> the accessors before that can happen.
>
> Read the marker with page_private(), to match how it is set.
>
> No functional change.
>
> Signed-off-by: Nilay Vaish <nilayvaish@google.com>
Reviewed-by: Gao Xiang <xiang@kernel.org>
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-28 4:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 3:37 [PATCH] erofs: use page_private() in z_erofs_is_shortlived_page() Nilay Vaish
2026-11-28 4:11 ` Gao Xiang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.