diff options
author | Christian Brauner <brauner@kernel.org> | 2024-09-05 09:56:47 +0200 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2024-09-10 11:42:58 +0200 |
commit | 9816c3c4e778b2477fda1966bf7047a2d9772d14 (patch) | |
tree | c498d58e9b46d931405d19fc09fa8048128288ba /mm | |
parent | slab: port kmem_cache_create() to struct kmem_cache_args (diff) | |
download | linux-9816c3c4e778b2477fda1966bf7047a2d9772d14.tar.xz linux-9816c3c4e778b2477fda1966bf7047a2d9772d14.zip |
slab: port kmem_cache_create_rcu() to struct kmem_cache_args
Port kmem_cache_create_rcu() to struct kmem_cache_args.
Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab_common.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index ac0832dac01e..da62ed30f95d 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -481,9 +481,13 @@ struct kmem_cache *kmem_cache_create_rcu(const char *name, unsigned int size, unsigned int freeptr_offset, slab_flags_t flags) { - return do_kmem_cache_create_usercopy(name, size, freeptr_offset, 0, - flags | SLAB_TYPESAFE_BY_RCU, 0, 0, - NULL); + struct kmem_cache_args kmem_args = { + .freeptr_offset = freeptr_offset, + .use_freeptr_offset = true, + }; + + return __kmem_cache_create_args(name, size, &kmem_args, + flags | SLAB_TYPESAFE_BY_RCU); } EXPORT_SYMBOL(kmem_cache_create_rcu); |