diff mbox series

nfs: use KMEM_CACHE() to create nfs_page caches

Message ID 20241104032107.196045-1-sunke@kylinos.cn (mailing list archive)
State New
Headers show
Series nfs: use KMEM_CACHE() to create nfs_page caches | expand

Commit Message

Ke Sun Nov. 4, 2024, 3:21 a.m. UTC
Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify
the creation of SLAB caches.

Signed-off-by: Ke Sun <sunke@kylinos.cn>
---
 fs/nfs/pagelist.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index e27c07bd8929..4b84dd437dfe 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -1463,10 +1463,7 @@  void nfs_pageio_stop_mirroring(struct nfs_pageio_descriptor *pgio)
 
 int __init nfs_init_nfspagecache(void)
 {
-	nfs_page_cachep = kmem_cache_create("nfs_page",
-					    sizeof(struct nfs_page),
-					    0, SLAB_HWCACHE_ALIGN,
-					    NULL);
+	nfs_page_cachep = KMEM_CACHE(nfs_page, SLAB_HWCACHE_ALIGN);
 	if (nfs_page_cachep == NULL)
 		return -ENOMEM;