gfs2: flesh out delayed withdraw for gfs2_log_flush
authorBob Peterson <rpeterso@redhat.com>
Wed, 8 Jan 2020 17:37:30 +0000 (11:37 -0600)
committerBob Peterson <rpeterso@redhat.com>
Thu, 27 Feb 2020 13:53:18 +0000 (07:53 -0600)
commitca399c96e96e3f372f901a698a6fd17796b8ed32
tree9766df255f2ee4ce3ff4a649b99c0341b3155265
parent1c634f94c3da39115270d35b3075af970810a927
gfs2: flesh out delayed withdraw for gfs2_log_flush

Function gfs2_log_flush() had a few places where it tried to withdraw
from the file system when errors were encountered. The problem is,
it should delay those withdraws until the log flush lock is no longer
held.

This patch creates a new function just for delayed withdraws for
situations like this. If errors=panic was specified on mount, we
still want to do it the old fashioned way because the panic it does
not help to delay in that situation.

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