Skip to contentSkip to conversation

fs: dlm: fix return value check in dlm_memory_init()

PATCH New Yang Yingliang 1 participant 1 message Jan 3, 2023 Distributed lock manager (DLM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: dlm: fix return value check in dlm_memory_init()

It should check 'cb_cache', after calling kmem_cache_create("dlm_cb").

Fixes 61bed0baa4db ("fs: dlm: use a non-static queue for callbacks")
---
 fs/dlm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/dlm/memory.c +1 -1
index eb7a08641fcf..cdbaa452fc05 100644
@@ -51,7 +51,7 @@ int __init dlm_memory_init(void)
 	cb_cache = kmem_cache_create("dlm_cb", sizeof(struct dlm_callback),
 				     __alignof__(struct dlm_callback), 0,
 				     NULL);
-	if (!rsb_cache)
+	if (!cb_cache)
 		goto cb;
 
 	return 0;
Signature · 1 line
2.25.1