Re: [PATCH] slab: remove alloc_full_sheaf()
From: Hao Li
Date: Thu Mar 12 2026 - 00:52:28 EST
On Thu, Mar 12, 2026 at 01:36:11PM +0900, Harry Yoo wrote:
> 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!
Indeed!
Reviewed-by: Hao Li <hao.li@xxxxxxxxx>
--
Thanks,
Hao