]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: fix infinite loop when checking ail item count before go_inval
authorBob Peterson <rpeterso@redhat.com>
Wed, 22 May 2019 14:21:21 +0000 (09:21 -0500)
committerBob Peterson <rpeterso@redhat.com>
Thu, 27 Feb 2020 13:53:17 +0000 (07:53 -0600)
commit61861c5cb4fdff4f7234ae7a79b9bcbfd73ce79c
tree16feec8a70ce9c7a0a24bb317c0cd8bb19564de4
parentec381c1f2570423141138821f18db30f2e8e83d8
gfs2: fix infinite loop when checking ail item count before go_inval

Before this patch, the rgrp_go_inval and inode_go_inval functions each
checked if there were any items left on the ail count (by way of a
count), and if so, did a withdraw. But the withdraw code now uses
glocks when changing the file system to read-only status. So we can
not have glock functions withdrawing or a hang will likely result:
The glocks can't be serviced by the work_func if the work_func is
busy doing its own withdraw.

This patch removes the checks from the go_inval functions and adds
a centralized check in do_xmote to warn about the problem and not
withdraw, but flag the error so it's eventually caught when the logd
daemon eventually runs.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c
fs/gfs2/glops.c