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>] [day] [month] [year] [list]
Message-Id: <20250828083235.46347-1-lihongfu@kylinos.cn>
Date: Thu, 28 Aug 2025 16:32:35 +0800
From: Hongfu Li <lihongfu@...inos.cn>
To: aahringo@...hat.com,
	teigland@...hat.com
Cc: gfs2@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Hongfu Li <lihongfu@...inos.cn>
Subject: [PATCH] dlm: use KMEM_CACHE in dlm_memory_init

Using KMEM_CACHE() macro makes the code more concise and easy to read.

Signed-off-by: Hongfu Li <lihongfu@...inos.cn>
---
 fs/dlm/memory.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c
index 5c35cc67aca4..124b370d1571 100644
--- a/fs/dlm/memory.c
+++ b/fs/dlm/memory.c
@@ -34,8 +34,7 @@ int __init dlm_memory_init(void)
 	if (!mhandle_cache)
 		goto mhandle;
 
-	lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb),
-				__alignof__(struct dlm_lkb), 0, NULL);
+	lkb_cache = KMEM_CACHE(dlm_lkb, 0);
 	if (!lkb_cache)
 		goto lkb;
 
@@ -43,8 +42,7 @@ int __init dlm_memory_init(void)
 	if (!msg_cache)
 		goto msg;
 
-	rsb_cache = kmem_cache_create("dlm_rsb", sizeof(struct dlm_rsb),
-				__alignof__(struct dlm_rsb), 0, NULL);
+	rsb_cache = KMEM_CACHE(dlm_rsb, 0);
 	if (!rsb_cache)
 		goto rsb;
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ