diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-11-17 17:11:41 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-11-21 09:45:49 -0600 |
commit | 9267c85769e62c10961451fd28e88de996fdf401 (patch) | |
tree | 912820f5f5cafa10c854c0bbbcee0c04ec4e7768 /fs/dlm | |
parent | f217d7ccb9f9ae8d9525958f902c059db1c78355 (diff) | |
download | linux-9267c85769e62c10961451fd28e88de996fdf401.tar.gz linux-9267c85769e62c10961451fd28e88de996fdf401.tar.bz2 linux-9267c85769e62c10961451fd28e88de996fdf401.zip |
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: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/ast.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c index 078bbbd43a53..982d093b80cd 100644 --- a/fs/dlm/ast.c +++ b/fs/dlm/ast.c @@ -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); } |