Re: [PATCH RFC 08/14] fs/erofs: use folio_attach/detach_private() instead of direct assignment

Gao Xiang <[email protected]> Tue, 4 Aug 2026 07:40:53 +0800
Newsgroups org.kvack.linux-mm,org.kernel.vger.linux-kernel,org.ozlabs.lists.linux-erofs
Message-ID <[email protected]>
Hi Zi,

On Fri, Jul 31, 2026 at 10:13:31PM -0400, Zi Yan wrote:
> erofs_onelinefolio_init/split/end() use folio->private without setting
> PG_private or increase folio refcount and it works. But after PG_private is
> replaced by checking folio->private in a future commit, it can break
> folio_expected_ref_count(), since the folio has private data without
> elevated refcount. Change it now.
> 
> It prepares for a future commit that removes PG_private.
> 
> No funtional change intended.
> 
> Assisted-by: Claude:claude-opus-4-8
> Assisted-by: Codex:gpt-5
> Signed-off-by: Zi Yan <[email protected]>
> To: Gao Xiang <[email protected]>
> To: Chao Yu <[email protected]>
> Cc: Yue Hu <[email protected]>
> Cc: Jeffle Xu <[email protected]>
> Cc: Sandeep Dhavale <[email protected]>
> Cc: Hongbo Li <[email protected]>
> Cc: Chunhai Guo <[email protected]>
> Cc: [email protected]
> Cc: [email protected]

It looks fine as long as PG_private flag will be removed in the
follow-up patches:

Reviewed-by: Gao Xiang <[email protected]>

Thanks,
Gao Xiang