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: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
spin_unlock(&lkb->lkb_cb_lock);
if (WARN_ON(rv == DLM_DEQUEUE_CALLBACK_EMPTY))
- return;
+ goto out;
for (;;) {
castfn = lkb->lkb_astfn;
spin_unlock(&lkb->lkb_cb_lock);
}
+out:
/* undo kref_get from dlm_add_callback, may cause lkb to be freed */
dlm_put_lkb(lkb);
}