Commit a8b7528b authored by Bob Peterson's avatar Bob Peterson Committed by Andreas Gruenbacher

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 <wubo40@huawei.com> for reporting this problem.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent ac915584
...@@ -613,7 +613,7 @@ __acquires(&gl->gl_lockref.lock) ...@@ -613,7 +613,7 @@ __acquires(&gl->gl_lockref.lock)
fs_err(sdp, "Error %d syncing glock \n", ret); fs_err(sdp, "Error %d syncing glock \n", ret);
gfs2_dump_glock(NULL, gl, true); gfs2_dump_glock(NULL, gl, true);
} }
return; goto out;
} }
} }
if (test_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags)) { if (test_bit(GLF_INVALIDATE_IN_PROGRESS, &gl->gl_flags)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment