dlm: Simplify the allocation of slab caches in dlm_midcomms_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>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
Kunwu Chan 2024-03-28 11:48:34 -04:00 committed by David Teigland
parent ad191e0eee
commit 609ed5bde2

View 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)