From: Nilay Vaish <nilayvaish@google.com>
To: Gao Xiang <xiang@kernel.org>
Cc: Chao Yu <chao@kernel.org>, Yue Hu <zbestahu@gmail.com>,
Jingbo Xu <jefflexu@163.com>,
Sandeep Dhavale <dhavale@google.com>,
Hongbo Li <hongbohbli@tencent.com>,
Chunhai Guo <guochunhai@vivo.com>,
linux-erofs@lists.ozlabs.org,
Nilay Vaish <nilayvaish@google.com>
Subject: [PATCH] erofs: use page_private() in z_erofs_is_shortlived_page()
Date: Mon, 23 Nov 2026 19:37:01 -0800 [thread overview]
Message-ID: <20261124033701.832938-1-nilayvaish@google.com> (raw)
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
next reply other threads:[~2026-11-24 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 3:37 Nilay Vaish [this message]
2026-11-28 4:11 ` [PATCH] erofs: use page_private() in z_erofs_is_shortlived_page() Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124033701.832938-1-nilayvaish@google.com \
--to=nilayvaish@google.com \
--cc=chao@kernel.org \
--cc=dhavale@google.com \
--cc=guochunhai@vivo.com \
--cc=hongbohbli@tencent.com \
--cc=jefflexu@163.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=xiang@kernel.org \
--cc=zbestahu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.