dlm: Simplify the allocation of slab caches in dlm_lowcomms_msg_cache_create

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>
This commit is contained in:
Kunwu Chan 2024-04-02 15:17:56 -04:00 committed by David Teigland
parent 2bec1bbd55
commit ca0dcef7cf

View 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 */