From: Alexander Aring Date: Tue, 1 Aug 2023 18:09:38 +0000 (-0400) Subject: fs: dlm: add missing spin_unlock X-Git-Tag: v6.6-rc1~112^2~13 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e717f2e8e4896f4c59a865b11d5cb957b0bfb0e1;p=linux-block.git 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 Signed-off-by: David Teigland --- 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; }