Re: [PATCH] slab: remove alloc_full_sheaf()
From: Harry Yoo
Date: Thu Mar 12 2026 - 00:37:05 EST
On Wed, Mar 11, 2026 at 07:22:33PM +0100, Vlastimil Babka (SUSE) wrote:
> The function allocates and then refills and empty sheaf. It's only
nit: ^an empty sheaf?
> called from __pcs_replace_empty_main(), which can also in some cases
> refill an empty sheaf. We can therefore consolidate this code.
>
> Remove alloc_full_sheaf() and refactor __pcs_replace_empty_main() so it
> will call alloc_empty_sheaf() when necessary, and then use the
> pre-existing refill_sheaf(). The result should be simpler to follow and
> less duplicated code.
>
> Also adjust the comment about returning sheaves to barn, the part about
> where the empty sheaf we'd be returning comes from is incorrect.
>
> No functional change intended.
>
> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> ---
Nice cleanup!
Looks good to me,
Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
--
Cheers,
Harry / Hyeonggon