gfs2: Fix glock recursion in freeze_go_xmote_bh
authorBob Peterson <rpeterso@redhat.com>
Tue, 1 Jun 2021 14:41:40 +0000 (09:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:25 +0000 (13:40 +0200)
commit783be2a942999d3521c505b58157a87063de2c03
tree0d50dc382a016f107ebaa0475dc217bea03bde88
parent4e014ff22e4bca97193bc36fd67c2233422690b6
gfs2: Fix glock recursion in freeze_go_xmote_bh

[ Upstream commit 9d9b16054b7d357afde69a027514c695092b0d22 ]

We must not call gfs2_consist (which does a file system withdraw) from
the freeze glock's freeze_go_xmote_bh function because the withdraw
will try to use the freeze glock, thus causing a glock recursion error.

This patch changes freeze_go_xmote_bh to call function
gfs2_assert_withdraw_delayed instead of gfs2_consist to avoid recursion.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/gfs2/glops.c