Re: [PATCH v3 03/18] mm/huge_memory: invert folio_ref_freeze() check to reduce indentation

From: Barry Song

Date: Thu Aug 27 2026 - 05:07:38 EST


On Fri, Aug 21, 2026 at 2:55 AM Kairui Song via B4 Relay
<devnull+kasong.tencent.com@xxxxxxxxxx> 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.
>
> Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
> ---

Good indentation reduction.

Reviewed-by: Barry Song <baohua@xxxxxxxxxx>