Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kunwu Chan and committed by
David Teigland
ca0dcef7 2bec1bbd

+1 -1
+1 -1
fs/dlm/lowcomms.c
··· 248 248 249 249 struct kmem_cache *dlm_lowcomms_msg_cache_create(void) 250 250 { 251 - return kmem_cache_create("dlm_msg", sizeof(struct dlm_msg), 0, 0, NULL); 251 + return KMEM_CACHE(dlm_msg, 0); 252 252 } 253 253 254 254 /* need to held writequeue_lock */