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]
Date: Thu, 29 Feb 2024 16:33:42 +0800
From: kunwu.chan@...ux.dev
To: chandan.babu@...cle.com,
	djwong@...nel.org
Cc: linux-xfs@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Kunwu Chan <chentao@...inos.cn>
Subject: [PATCH] xfs: use KMEM_CACHE() to create xfs_defer_pending 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/xfs/libxfs/xfs_defer.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c
index 66a17910d021..6d957fcc17f2 100644
--- a/fs/xfs/libxfs/xfs_defer.c
+++ b/fs/xfs/libxfs/xfs_defer.c
@@ -1143,9 +1143,7 @@ xfs_defer_resources_rele(
 static inline int __init
 xfs_defer_init_cache(void)
 {
-	xfs_defer_pending_cache = kmem_cache_create("xfs_defer_pending",
-			sizeof(struct xfs_defer_pending),
-			0, 0, NULL);
+	xfs_defer_pending_cache = KMEM_CACHE(xfs_defer_pending, 0);
 
 	return xfs_defer_pending_cache != NULL ? 0 : -ENOMEM;
 }
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ