mm/sl[au]b: use own bulk free function when bulk alloc failed
authorHyeonggon Yoo <42.hyeyoo@gmail.com>
Tue, 14 Jun 2022 15:26:34 +0000 (00:26 +0900)
committerVlastimil Babka <vbabka@suse.cz>
Wed, 20 Jul 2022 11:30:11 +0000 (13:30 +0200)
commit2055e67bb6a8fbb6aabdb9536443688ef52456c4
tree20c6a80d52916a6cc5f60eab90afa173511d4b45
parentb77d5b1b83e3e14870224de7c63f115a2dc44e9a
mm/sl[au]b: use own bulk free function when bulk alloc failed

There is no benefit to call generic bulk free function when
kmem_cache_alloc_bulk() failed. Use own kmem_cache_free_bulk()
instead of generic function.

Note that if kmem_cache_alloc_bulk() fails to allocate first object in
SLUB, size is zero. So allow passing size == 0 to kmem_cache_free_bulk()
like SLAB's.

Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab.c
mm/slub.c