summaryrefslogtreecommitdiff
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2023-08-01 14:09:38 -0400
committerDavid Teigland <teigland@redhat.com>2023-08-10 10:33:03 -0500
commite717f2e8e4896f4c59a865b11d5cb957b0bfb0e1 (patch)
treeb185e39148cbdfae615b6b3c35ce1259acdfb633 /fs/dlm
parentdc52cd2eff4ac924a795efcef27f8fd58a5260bb (diff)
fs: dlm: add missing spin_unlock
This patch fixes commit dc52cd2eff4a ("fs: dlm: fix F_CANCELLK to cancel pending request") that we don't unlock the ops_lock in a rate case when a waiter cannot be found. This case can only happen when cancellation of plock operation was successful but no kernel waiter was being found. Fixes: dc52cd2eff4a ("fs: dlm: fix F_CANCELLK to cancel pending request") 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/plock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index 943d9f8e5564..44b3aab5b709 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -398,6 +398,7 @@ int dlm_posix_cancel(dlm_lockspace_t *lockspace, u64 number, struct file *file,
*/
op = plock_lookup_waiter(&info);
if (WARN_ON_ONCE(!op)) {
+ spin_unlock(&ops_lock);
rv = -ENOLCK;
break;
}