mm/slub: remove slab_alloc() and __kmem_cache_alloc_lru() wrappers
authorVlastimil Babka <vbabka@suse.cz>
Thu, 26 Oct 2023 15:45:42 +0000 (17:45 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Wed, 6 Dec 2023 10:57:22 +0000 (11:57 +0100)
commit49378a05ce7f01a203550eb7c2ef772f6d24565c
treee80dbc9d142b6b6c682786460098d46e2e481716
parent4862caa5cba027bf7de925e05e4d1a64c89d81d6
mm/slub: remove slab_alloc() and __kmem_cache_alloc_lru() wrappers

slab_alloc() is a thin wrapper around slab_alloc_node() with only one
caller.  Replace with direct call of slab_alloc_node().
__kmem_cache_alloc_lru() itself is a thin wrapper with two callers,
so replace it with direct calls of slab_alloc_node() and
trace_kmem_cache_alloc().

This also makes sure _RET_IP_ has always the expected value and not
depending on inlining decisions.

Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: David Rientjes <rientjes@google.com>
Tested-by: David Rientjes <rientjes@google.com>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slub.c