Message ID | 20240905-work-kmem_cache_args-v4-3-ed45d5380679@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | slab: add struct kmem_cache_args | expand |
On Thu, Sep 05, 2024 at 09:56:46AM +0200, Christian Brauner wrote: > Port kmem_cache_create() 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>
diff --git a/mm/slab_common.c b/mm/slab_common.c index 0f13c045b8d1..ac0832dac01e 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -439,8 +439,12 @@ struct kmem_cache * kmem_cache_create(const char *name, unsigned int size, unsigned int align, slab_flags_t flags, void (*ctor)(void *)) { - return do_kmem_cache_create_usercopy(name, size, UINT_MAX, align, flags, - 0, 0, ctor); + struct kmem_cache_args kmem_args = { + .align = align, + .ctor = ctor, + }; + + return __kmem_cache_create_args(name, size, &kmem_args, flags); } EXPORT_SYMBOL(kmem_cache_create);