Skip to content

Commit

Permalink
fs: dlm: fix return value check in dlm_memory_init()
Browse files Browse the repository at this point in the history
[ Upstream commit 8113aa9 ]

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

Fixes: 61bed0b ("fs: dlm: use a non-static queue for callbacks")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yang Yingliang authored and gregkh committed Mar 10, 2023
1 parent 4c22ee8 commit a43a098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dlm/memory.c
Expand Up @@ -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;
Expand Down

0 comments on commit a43a098

Please sign in to comment.