aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2/locking/dlm/lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/locking/dlm/lock.c')
-rw-r--r--fs/gfs2/locking/dlm/lock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c
index cf7ea8abec8..fed9a67be0f 100644
--- a/fs/gfs2/locking/dlm/lock.c
+++ b/fs/gfs2/locking/dlm/lock.c
@@ -308,6 +308,9 @@ unsigned int gdlm_lock(void *lock, unsigned int cur_state,
{
struct gdlm_lock *lp = lock;
+ if (req_state == LM_ST_UNLOCKED)
+ return gdlm_unlock(lock, cur_state);
+
clear_bit(LFL_DLM_CANCEL, &lp->flags);
if (flags & LM_FLAG_NOEXP)
set_bit(LFL_NOBLOCK, &lp->flags);