Skip to content

Commit 192d80c

Browse files
KunWuChanchucklever
authored andcommitted
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>
1 parent 2f74991 commit 192d80c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/nfsd/nfscache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ nfsd_reply_cache_free(struct nfsd_drc_bucket *b, struct nfsd_cacherep *rp,
166166

167167
int nfsd_drc_slab_create(void)
168168
{
169-
drc_slab = kmem_cache_create("nfsd_drc",
170-
sizeof(struct nfsd_cacherep), 0, 0, NULL);
169+
drc_slab = KMEM_CACHE(nfsd_cacherep, 0);
171170
return drc_slab ? 0: -ENOMEM;
172171
}
173172

0 commit comments

Comments
 (0)