]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: If go_sync returns error, withdraw but skip invalidate
authorBob Peterson <rpeterso@redhat.com>
Thu, 7 May 2020 17:12:23 +0000 (12:12 -0500)
committerBob Peterson <rpeterso@redhat.com>
Fri, 8 May 2020 20:00:07 +0000 (15:00 -0500)
commitd63585f23f3e9b9d541bd319c8bce780c8a29ea9
tree45d226c4e92f0ad5eff829f70a79f1fb4bf1e6a5
parent89f5b476eb89af6b903d7fccf0f5ca73135a7d80
gfs2: If go_sync returns error, withdraw but skip invalidate

Before this patch, if the go_sync operation returned an error during
the do_xmote process (such as unable to sync metadata to the journal)
the code did goto out. That kept the glock locked, so it could not be
given away, which correctly avoids file system corruption. However,
it never set the withdraw bit or requeueing the glock work. So it would
hang forever, unable to ever demote the glock.

This patch changes to goto to a new label, skip_inval, so that errors
from go_sync are treated the same way as errors from go_inval:
The delayed withdraw bit is set and the work is requeued. That way,
the logd should eventually figure out there's a problem and withdraw
properly there.

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