Re: [PATCH] mm/huge_memory: refactor after-split (page) cache code.

From: Zi Yan
Date: Thu Jul 17 2025 - 11:45:50 EST



>>
>> Since we no longer need to make new_folio->index >= end work for anon
>> folios, can we drop the end = -1 in the if (is_anon) { ... } branch?
>
> Sure.

A second thought on this one. If I remove end = -1, can static analysis
tools understand that end is not used when a folio is anonymous?
Probably, I can initialize end to -1 and remove end = -1 in is_anon
branch.

Best Regards,
Yan, Zi