Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 617fc777 authored by Kunwu Chan's avatar Kunwu Chan Committed by Christian Brauner
Browse files

fs: Use KMEM_CACHE instead of kmem_cache_create

commit 0a31bd5f

 ("KMEM_CACHE(): simplify slab cache creation")
introduces a new macro.
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.

Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20240131070941.135178-1-chentao@kylinos.cn


Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent c67ef897
No related merge requests found
...@@ -325,9 +325,7 @@ EXPORT_SYMBOL_GPL(backing_file_mmap); ...@@ -325,9 +325,7 @@ EXPORT_SYMBOL_GPL(backing_file_mmap);
static int __init backing_aio_init(void) static int __init backing_aio_init(void)
{ {
backing_aio_cachep = kmem_cache_create("backing_aio", backing_aio_cachep = KMEM_CACHE(backing_aio, SLAB_HWCACHE_ALIGN);
sizeof(struct backing_aio),
0, SLAB_HWCACHE_ALIGN, NULL);
if (!backing_aio_cachep) if (!backing_aio_cachep)
return -ENOMEM; return -ENOMEM;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment