[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240131070941.135178-1-chentao@kylinos.cn>
Date: Wed, 31 Jan 2024 15:09:41 +0800
From: Kunwu Chan <chentao@...inos.cn>
To: miklos@...redi.hu,
amir73il@...il.com,
viro@...iv.linux.org.uk,
brauner@...nel.org,
jack@...e.cz
Cc: linux-fsdevel@...r.kernel.org,
linux-unionfs@...r.kernel.org,
linux-kernel@...r.kernel.org,
Kunwu Chan <chentao@...inos.cn>
Subject: [PATCH] fs: Use KMEM_CACHE instead of kmem_cache_create
commit 0a31bd5f2bbb ("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: Kunwu Chan <chentao@...inos.cn>
---
fs/backing-file.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/backing-file.c b/fs/backing-file.c
index a681f38d84d8..740185198db3 100644
--- a/fs/backing-file.c
+++ b/fs/backing-file.c
@@ -325,9 +325,7 @@ EXPORT_SYMBOL_GPL(backing_file_mmap);
static int __init backing_aio_init(void)
{
- backing_aio_cachep = kmem_cache_create("backing_aio",
- sizeof(struct backing_aio),
- 0, SLAB_HWCACHE_ALIGN, NULL);
+ backing_aio_cachep = KMEM_CACHE(backing_aio, SLAB_HWCACHE_ALIGN);
if (!backing_aio_cachep)
return -ENOMEM;
--
2.39.2
Powered by blists - more mailing lists