mm, slab, kasan: replace kasan_never_merge() with SLAB_NO_MERGE
authorVlastimil Babka <vbabka@suse.cz>
Fri, 23 Feb 2024 18:27:19 +0000 (19:27 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Mon, 26 Feb 2024 09:10:07 +0000 (10:10 +0100)
commit96d8dbb6f65041b670a79e8ae76f67cc11dee203
tree26b453545a10a6c8a9058c0a3ac19b05a46552aa
parentcc61eb851c9ae38546d7df6076fd883d3dbc322d
mm, slab, kasan: replace kasan_never_merge() with SLAB_NO_MERGE

The SLAB_KASAN flag prevents merging of caches in some configurations,
which is handled in a rather complicated way via kasan_never_merge().
Since we now have a generic SLAB_NO_MERGE flag, we can instead use it
for KASAN caches in addition to SLAB_KASAN in those configurations,
and simplify the SLAB_NEVER_MERGE handling.

Tested-by: Xiongwei Song <xiongwei.song@windriver.com>
Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Tested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
include/linux/kasan.h
mm/kasan/generic.c
mm/slab_common.c