]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dlm: Simplify the allocation of slab caches in dlm_midcomms_cache_create
authorKunwu Chan <chentao@kylinos.cn>
Thu, 28 Mar 2024 15:48:34 +0000 (11:48 -0400)
committerDavid Teigland <teigland@redhat.com>
Mon, 1 Apr 2024 18:31:12 +0000 (13:31 -0500)
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@kylinos.cn>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/midcomms.c

index 2247ebb61be1eefe02e10c9dab68c0fbe58c24ee..8e9920f1b48b74348079fc58dd036e47a740af69 100644 (file)
@@ -226,8 +226,7 @@ static DEFINE_MUTEX(close_lock);
 
 struct kmem_cache *dlm_midcomms_cache_create(void)
 {
-       return kmem_cache_create("dlm_mhandle", sizeof(struct dlm_mhandle),
-                                0, 0, NULL);
+       return KMEM_CACHE(dlm_mhandle, 0);
 }
 
 static inline const char *dlm_state_str(int state)