Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Junxiao Bi and committed by
Linus Torvalds
3278bb74 d787ab09

+4 -1
+4 -1
fs/ocfs2/dlmglue.c
··· 2545 2545 * everything is up to the caller :) */ 2546 2546 status = ocfs2_should_refresh_lock_res(lockres); 2547 2547 if (status < 0) { 2548 + ocfs2_cluster_unlock(osb, lockres, level); 2548 2549 mlog_errno(status); 2549 2550 goto bail; 2550 2551 } ··· 2554 2553 2555 2554 ocfs2_complete_lock_res_refresh(lockres, status); 2556 2555 2557 - if (status < 0) 2556 + if (status < 0) { 2557 + ocfs2_cluster_unlock(osb, lockres, level); 2558 2558 mlog_errno(status); 2559 + } 2559 2560 ocfs2_track_lock_refresh(lockres); 2560 2561 } 2561 2562 bail: