]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
slab: remove alloc_full_sheaf()
authorVlastimil Babka (SUSE) <vbabka@kernel.org>
Wed, 11 Mar 2026 18:22:33 +0000 (19:22 +0100)
committerVlastimil Babka (SUSE) <vbabka@kernel.org>
Mon, 16 Mar 2026 13:13:46 +0000 (14:13 +0100)
commit69d73421b76e3d952076be2e17cea42de90d126a
treea880c52385a3875eda63ecace94686cb7c78a420
parentf338e77383789c0cae23ca3d48adcc5e9e137e3c
slab: remove alloc_full_sheaf()

The function allocates and then refills and empty sheaf. It's only
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.

Reviewed-by: Qing Wang <wangqing7171@gmail.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Link: https://patch.msgid.link/20260311-b4-slab-remove-alloc_full_sheaf-v1-1-c4c5bb587ae5@kernel.org
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
mm/slub.c