Linux 6.12: avoid kmem_cache_create redefinition

torvalds/linux@b2e7456b5c makes kmem_cache_create() a macro, which
gets in the way of our our own redefinition, so we undef the macro first
for our own clients. This follows what we did for kmem_cache_alloc(),
see e951dba48.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16582
This commit is contained in:
Rob Norris 2024-09-24 15:43:48 +10:00 committed by Brian Behlendorf
parent 20232ecfaa
commit bc96b80550

View File

@ -200,6 +200,7 @@ extern uint64_t spl_kmem_cache_entry_size(kmem_cache_t *cache);
/* Avoid conflicts with kernel names that might be implemented as macros. */ /* Avoid conflicts with kernel names that might be implemented as macros. */
#undef kmem_cache_alloc #undef kmem_cache_alloc
#undef kmem_cache_create
#define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \ #define kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) \
spl_kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl) spl_kmem_cache_create(name, size, align, ctor, dtor, rclm, priv, vmp, fl)