Re: [PATCH v4 7/8] mm/memory: flatten folio allocation retry loops

From: Usama Arif

Date: Tue May 26 2026 - 08:18:22 EST


On Thu, 21 May 2026 11:02:13 -0400 Johannes Weiner <hannes@xxxxxxxxxxx> wrote:

> alloc_swap_folio() and alloc_anon_folio() use a top-level if (folio)
> that buries the success path four levels deep. This makes for awkward
> long lines and wrapping. The next patch will add more code here, so
> flatten this now to keep things clean and simple.
>
> alloc_anon_folio() already has a next label, use it for !folio. Add
> the equivalent to alloc_swap_folio().
>
> No functional change intended.
>
> Suggested-by: Lorenzo Stoakes (Oracle) <ljs@xxxxxxxxxx>
> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>

Acked-by: Usama Arif <usama.arif@xxxxxxxxx>