mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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>
This commit is contained in:
parent
f6cd98c940
commit
9816c3c4e7
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user