Re: [PATCH RFC 03/13] mm/huge_memory: invert folio_ref_freeze() check to reduce indentation
From: Zi Yan
Date: Sat Aug 08 2026 - 14:04:43 EST
On Fri Aug 7, 2026 at 5:17 PM EDT, Kairui Song via B4 Relay wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> Invert the folio_ref_freeze() success check in
> __folio_freeze_and_split_unmapped() to return early on failure, which
> removes one level of indentation from the entire success path.
>
> This is a pure refactoring with no functional change. It prepares the
> function to be split into separate helpers for anonymous and
> file-backed folios in a later patch.
>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
> ---
> mm/huge_memory.c | 181 +++++++++++++++++++++++++++----------------------------
> 1 file changed, 90 insertions(+), 91 deletions(-)
>
LGTM. Thanks for the cleanup.
Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi