]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dlm: Simplify the allocation of slab caches in dlm_lowcomms_msg_cache_create
authorKunwu Chan <chentao@kylinos.cn>
Tue, 2 Apr 2024 19:17:56 +0000 (15:17 -0400)
committerDavid Teigland <teigland@redhat.com>
Tue, 2 Apr 2024 20:24:40 +0000 (15:24 -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>
Acked-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c

index 6296c62c10fa95ccf14ea3f99228db50d2d619c7..712165a1e56791c5248d8ef46b8f88833b301b62 100644 (file)
@@ -248,7 +248,7 @@ struct kmem_cache *dlm_lowcomms_writequeue_cache_create(void)
 
 struct kmem_cache *dlm_lowcomms_msg_cache_create(void)
 {
-       return kmem_cache_create("dlm_msg", sizeof(struct dlm_msg), 0, 0, NULL);
+       return KMEM_CACHE(dlm_msg, 0);
 }
 
 /* need to held writequeue_lock */