mm/slab: move pre/post-alloc hooks from slab.h to slub.c
authorVlastimil Babka <vbabka@suse.cz>
Tue, 3 Oct 2023 09:57:45 +0000 (11:57 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Wed, 6 Dec 2023 10:57:21 +0000 (11:57 +0100)
commit6011be59910fb12b757f9d37793d21763268b4a1
tree1535df6540906d53a920ec1f57dfd2d4b7a36bbc
parent89c2d061bfa7fe2b5bcb1393a7a79bb5db8d4140
mm/slab: move pre/post-alloc hooks from slab.h to slub.c

We don't share the hooks between two slab implementations anymore so
they can be moved away from the header. As part of the move, also move
should_failslab() from slab_common.c as the pre_alloc hook uses it.
This means slab.h can stop including fault-inject.h and kmemleak.h.
Fix up some files that were depending on the includes transitively.

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/kasan/report.c
mm/memcontrol.c
mm/slab.h
mm/slab_common.c
mm/slub.c