]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Fix error exit in do_xmote
authorBob Peterson <rpeterso@redhat.com>
Thu, 23 Apr 2020 19:30:57 +0000 (14:30 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 May 2020 12:45:38 +0000 (14:45 +0200)
commit98e6ccf4db8aa3df5f9740542f5101cc984d181e
treeea62be8a053fa2dd9ba94407025973fb9f74fbfe
parent92f06b89d0530219a7e6de9ac215da71e3b3ccb4
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: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c