gfs2: clear ail1 list when gfs2 withdraws
authorBob Peterson <rpeterso@redhat.com>
Wed, 13 Nov 2019 17:47:09 +0000 (11:47 -0600)
committerBob Peterson <rpeterso@redhat.com>
Mon, 10 Feb 2020 13:39:48 +0000 (07:39 -0600)
commit30fe70a85a909a23dcbc2c628ca6655b2c85e7a1
tree758a55dbafb03d741b05a30aad9a397b4ff84213
parent69511080bd6efd34f4e020fcde6cf73bb4a61af6
gfs2: clear ail1 list when gfs2 withdraws

This patch fixes a bug in which function gfs2_log_flush can get into
an infinite loop when a gfs2 file system is withdrawn. The problem
is the infinite loop "for (;;)" in gfs2_log_flush which would never
finish because the io error and subsequent withdraw prevented the
items from being taken off the ail list.

This patch tries to clean up the mess by allowing withdraw situations
to move not-in-flight buffer_heads to the ail2 list, where they will
be dealt with later.

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