]> Gentwo Git Trees - linux/.git/commit
mm/slab: simplify SLAB_* flag handling
authorKevin Brodsky <kevin.brodsky@arm.com>
Fri, 24 Jan 2025 16:48:58 +0000 (16:48 +0000)
committerVlastimil Babka <vbabka@suse.cz>
Wed, 5 Feb 2025 13:31:56 +0000 (14:31 +0100)
commit7e15ba4854fc36d31944eb693a6508b8c001f0ae
treed962558c64d135f716f9d4ea923eda9e418b30cc
parent2014c95afecee3e76ca4a56956a936e23283f05b
mm/slab: simplify SLAB_* flag handling

SLUB is the only remaining allocator. We can therefore get rid of
the logic for allocator-specific flags:

* Merge SLAB_CACHE_FLAGS into SLAB_CORE_FLAGS.

* Remove CACHE_CREATE_MASK and instead mask out SLAB_DEBUG_FLAGS if
  !CONFIG_SLUB_DEBUG. SLAB_DEBUG_FLAGS is now defined
  unconditionally (no impact on existing code, which ignores it if
  !CONFIG_SLUB_DEBUG).

* Define SLAB_FLAGS_PERMITTED in terms of SLAB_CORE_FLAGS and
  SLAB_DEBUG_FLAGS (no functional change).

While at it also remove misleading comments that suggest that
multiple allocators are available.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab.h
mm/slab_common.c