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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240205081227.434198-1-chentao@kylinos.cn>
Date: Mon,  5 Feb 2024 16:12:27 +0800
From: Kunwu Chan <chentao@...inos.cn>
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: Simplify the allocation of slab caches in xfs_rmap_intent_init_cache

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

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

diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index 76bf7f48cb5a..99aac6f6f6b1 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -2931,9 +2931,7 @@ const struct xfs_owner_info XFS_RMAP_OINFO_COW = {
 int __init
 xfs_rmap_intent_init_cache(void)
 {
-	xfs_rmap_intent_cache = kmem_cache_create("xfs_rmap_intent",
-			sizeof(struct xfs_rmap_intent),
-			0, 0, NULL);
+	xfs_rmap_intent_cache = KMEM_CACHE(xfs_rmap_intent, 0);
 
 	return xfs_rmap_intent_cache != NULL ? 0 : -ENOMEM;
 }
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ