Re: [PATCH 1/3] mm: make mempool_alloc_from_pool() return bool
From: Harry Yoo
Date: Wed Sep 09 2026 - 09:12:59 EST
On Thu, Aug 06, 2026 at 03:10:29PM -0700, Eric Biggers wrote:
> mempool_alloc_from_pool() is intentionally all-or-nothing, so make it
> return a bool rather than the number of elements allocated.
>
> Then make mempool_alloc_bulk() return right away if
> mempool_alloc_from_pool() succeeds, rather than jumping back to the
> retry_alloc label to allocate nothing and then returning.
>
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
Looks good to me,
Reviewed-by: Harry Yoo (Meta) <harry@xxxxxxxxxx>
--
Cheers,
Harry / Hyeonggon