Re: [PATCH v6 RESEND 1/5] mm/memcontrol: flatten try_charge_memcg control flow

From: Harry Yoo

Date: Tue Sep 29 2026 - 09:34:26 EST


On Mon, Sep 28, 2026 at 12:23:44PM -0700, Joshua Hahn wrote:
> Refactor try_charge_memcg by flattening the nested memsw/memory
> page_counter operations to separate the logic between the two.
>
> When page_counter_try_charge is made stock-aware, this flattening makes
> the control flow easier to follow since each page counter now has its
> own success/failure paths.
>
> No functional changes intended.
>
> Acked-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>
> Signed-off-by: Joshua Hahn <joshua.hahnjy@xxxxxxxxx>
> ---

Looks good to me,
Reviewed-by: Harry Yoo (Meta) <harry@xxxxxxxxxx>

--
Cheers,
Harry / Hyeonggon