summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorKunwu Chan <chentao@kylinos.cn>2024-01-31 07:56:53 +0100
committerChuck Lever <chuck.lever@oracle.com>2024-03-01 15:12:23 +0100
commit2f74991a494bdc8b24a63a26b9266b0992321b5f (patch)
tree8d4344d0e2fbb647e4bea06fa14797008a40ac9c /fs/nfsd
parentnfsd: Simplify the allocation of slab caches in nfsd4_init_pnfs (diff)
downloadlinux-2f74991a494bdc8b24a63a26b9266b0992321b5f.tar.xz
linux-2f74991a494bdc8b24a63a26b9266b0992321b5f.zip
nfsd: Simplify the allocation of slab caches in nfsd_file_cache_init
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@kylinos.cn> Acked-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/filecache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 8d9f7b07e35b..f3a642fd0eca 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -722,15 +722,13 @@ nfsd_file_cache_init(void)
return ret;
ret = -ENOMEM;
- nfsd_file_slab = kmem_cache_create("nfsd_file",
- sizeof(struct nfsd_file), 0, 0, NULL);
+ nfsd_file_slab = KMEM_CACHE(nfsd_file, 0);
if (!nfsd_file_slab) {
pr_err("nfsd: unable to create nfsd_file_slab\n");
goto out_err;
}
- nfsd_file_mark_slab = kmem_cache_create("nfsd_file_mark",
- sizeof(struct nfsd_file_mark), 0, 0, NULL);
+ nfsd_file_mark_slab = KMEM_CACHE(nfsd_file_mark, 0);
if (!nfsd_file_mark_slab) {
pr_err("nfsd: unable to create nfsd_file_mark_slab\n");
goto out_err;