Commit 9267c857 authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland

fs: dlm: drop lkb ref in bug case

This patch will drop the lkb reference in an very unlikely case which
should in practice not happened. However if it happens we cleanup the
reference just in case.
Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent f217d7cc
......@@ -186,7 +186,7 @@ void dlm_callback_work(struct work_struct *work)
spin_unlock(&lkb->lkb_cb_lock);
if (WARN_ON(rv == DLM_DEQUEUE_CALLBACK_EMPTY))
return;
goto out;
for (;;) {
castfn = lkb->lkb_astfn;
......@@ -217,6 +217,7 @@ void dlm_callback_work(struct work_struct *work)
spin_unlock(&lkb->lkb_cb_lock);
}
out:
/* undo kref_get from dlm_add_callback, may cause lkb to be freed */
dlm_put_lkb(lkb);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment