]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Make sure we don't miss any delayed withdraws
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 28 Aug 2020 21:44:36 +0000 (23:44 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 14 Oct 2020 21:54:41 +0000 (23:54 +0200)
commit324de251b2c50f7f09e188980cae42fd4908f8d3
treee11c8f0b78d91bac0feeb6667005e3c392e174a8
parenta9bb09d87487fe2ee5c4394a0baeb5ae1c443105
gfs2: Make sure we don't miss any delayed withdraws

Commit e3d1c6199b02 changes gfs2_log_flush to not withdraw the
filesystem while holding the log flush lock, but it fails to check if
the filesystem needs to be withdrawn once the log flush lock has been
released.  Likewise, commit afb3e002be09 depends on gfs2_log_flush to
trigger for delayed withdraws.  Add that and clean up the code flow
somewhat.

In gfs2_put_super, add a check for delayed withdraws that have been
missed to prevent these kinds of bugs in the future.

Fixes: e3d1c6199b02 ("gfs2: flesh out delayed withdraw for gfs2_log_flush")
Fixes: afb3e002be09 ("gfs2: Prepare to withdraw as soon as an IO error occurs in log write")
Cc: stable@vger.kernel.org # v5.7+: f41e2fd928e0f: gfs2: add some much needed cleanup for log flushes that fail
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c
fs/gfs2/super.c
fs/gfs2/util.h