Skip to content

Commit 3278bb7

Browse files
biger410torvalds
authored andcommitted
ocfs2: unlock super lock if lockres refresh failed
If lockres refresh failed, the super lock will never be released which will cause some processes on other cluster nodes hung forever. Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d787ab0 commit 3278bb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/ocfs2/dlmglue.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -2545,6 +2545,7 @@ int ocfs2_super_lock(struct ocfs2_super *osb,
25452545
* everything is up to the caller :) */
25462546
status = ocfs2_should_refresh_lock_res(lockres);
25472547
if (status < 0) {
2548+
ocfs2_cluster_unlock(osb, lockres, level);
25482549
mlog_errno(status);
25492550
goto bail;
25502551
}
@@ -2553,8 +2554,10 @@ int ocfs2_super_lock(struct ocfs2_super *osb,
25532554

25542555
ocfs2_complete_lock_res_refresh(lockres, status);
25552556

2556-
if (status < 0)
2557+
if (status < 0) {
2558+
ocfs2_cluster_unlock(osb, lockres, level);
25572559
mlog_errno(status);
2560+
}
25582561
ocfs2_track_lock_refresh(lockres);
25592562
}
25602563
bail:

0 commit comments

Comments
 (0)