aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/locks.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c
index e57c804069ea..6b6d092b0998 100644
--- a/fs/ocfs2/locks.c
+++ b/fs/ocfs2/locks.c
@@ -82,6 +82,8 @@ static int ocfs2_do_flock(struct file *file, struct inode *inode,
82 } 82 }
83 83
84 ret = flock_lock_file_wait(file, fl); 84 ret = flock_lock_file_wait(file, fl);
85 if (ret)
86 ocfs2_file_unlock(file);
85 87
86out: 88out:
87 mutex_unlock(&fp->fp_mutex); 89 mutex_unlock(&fp->fp_mutex);