[PATCH] nfs: use KMEM_CACHE() to create nfs_page caches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify
the creation of SLAB caches.

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

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;
 
-- 
2.34.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux