Skip to content

Commit a8b7528

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: Fix error exit in do_xmote
Before this patch, if an error was detected from glock function go_sync by function do_xmote, it would return. But the function had temporarily unlocked the gl_lockref spin_lock, and it never re-locked it. When the caller of do_xmote tried to unlock it again, it was already unlocked, which resulted in a corrupted spin_lock value. This patch makes sure the gl_lockref spin_lock is re-locked after it is unlocked. Thanks to Wu Bo <[email protected]> for reporting this problem. Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent ac91558 commit a8b7528

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/gfs2/glock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ __acquires(&gl->gl_lockref.lock)
613613
fs_err(sdp, "Error %d syncing glock \n", ret);
614614
gfs2_dump_glock(NULL, gl, true);
615615
}
616-
return;
616+
goto out;
617617
}
618618
}
619619
if (test_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags)) {

0 commit comments

Comments
 (0)