lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240229094112.1154644-1-kunwu.chan@linux.dev>
Date: Thu, 29 Feb 2024 17:41:12 +0800
From: kunwu.chan@...ux.dev
To: trond.myklebust@...merspace.com,
	anna@...nel.org
Cc: linux-nfs@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Kunwu Chan <chentao@...inos.cn>
Subject: [PATCH] nfs: use KMEM_CACHE() to create nfs_commit_data cache

From: Kunwu Chan <chentao@...inos.cn>

Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify
the creation of SLAB caches when the default values are used.

Signed-off-by: Kunwu Chan <chentao@...inos.cn>
---
 fs/nfs/write.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index bb79d3a886ae..6a75772d447f 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -2148,10 +2148,7 @@ int __init nfs_init_writepagecache(void)
 	if (nfs_wdata_mempool == NULL)
 		goto out_destroy_write_cache;
 
-	nfs_cdata_cachep = kmem_cache_create("nfs_commit_data",
-					     sizeof(struct nfs_commit_data),
-					     0, SLAB_HWCACHE_ALIGN,
-					     NULL);
+	nfs_cdata_cachep = KMEM_CACHE(nfs_commit_data, SLAB_HWCACHE_ALIGN);
 	if (nfs_cdata_cachep == NULL)
 		goto out_destroy_write_mempool;
 
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ