Skip to content

Commit

Permalink
Linux 6.12: avoid kmem_cache_create redefinition
Browse files Browse the repository at this point in the history
torvalds/linux@b2e7456b5c25 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 e951dba.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16582
  • Loading branch information
robn authored and behlendorf committed Oct 1, 2024
1 parent 20232ec commit bc96b80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/os/linux/spl/sys/kmem_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
#undef kmem_cache_alloc
#undef kmem_cache_create

#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)
Expand Down

0 comments on commit bc96b80

Please sign in to comment.