aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorKunwu Chan <chentao@kylinos.cn>2024-02-04 11:28:21 +0800
committerChuck Lever <chuck.lever@oracle.com>2024-03-01 09:12:24 -0500
commit192d80cdcb4cd6691e15b0e0fc9bc94d3203e30d (patch)
tree4fd1dbe14ed8b9397cd9c8c99f89d4edf699d4de /fs/nfsd
parent2f74991a494bdc8b24a63a26b9266b0992321b5f (diff)
downloadlinux-192d80cdcb4cd6691e15b0e0fc9bc94d3203e30d.tar.gz
nfsd: Simplify the allocation of slab caches in nfsd_drc_slab_create
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. And change cache name from 'nfsd_drc' to 'nfsd_cacherep'. Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfscache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
index cfcc6ac8f255a..ba9d326b3de64 100644
--- a/fs/nfsd/nfscache.c
+++ b/fs/nfsd/nfscache.c
@@ -166,8 +166,7 @@ nfsd_reply_cache_free(struct nfsd_drc_bucket *b, struct nfsd_cacherep *rp,
int nfsd_drc_slab_create(void)
{
- drc_slab = kmem_cache_create("nfsd_drc",
- sizeof(struct nfsd_cacherep), 0, 0, NULL);
+ drc_slab = KMEM_CACHE(nfsd_cacherep, 0);
return drc_slab ? 0: -ENOMEM;
}