]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Do proper error checking for go_sync family of glops functions
authorBob Peterson <rpeterso@redhat.com>
Wed, 13 Nov 2019 20:09:28 +0000 (14:09 -0600)
committerBob Peterson <rpeterso@redhat.com>
Thu, 27 Feb 2020 13:53:18 +0000 (07:53 -0600)
commit1791c90b3dc59fd11c5f920f00a261fc36f4f341
treecd2cc44b168f3a562759c4d7194a1e7dcf395c5c
parent6ac54cc8acd8d79211700709b61b1302ea001124
gfs2: Do proper error checking for go_sync family of glops functions

Before this patch, function do_xmote would try to sync out the glock
dirty data by calling the appropriate glops function XXX_go_sync()
but it did not check for a good return code. If the sync was not
possible due to an io error or whatever, do_xmote would continue on
and call go_inval and release the glock to other cluster nodes.
When those nodes go to replay the journal, they may already be holding
glocks for the journal records that should have been synced, but were
not due to the ignored error.

This patch introduces proper error code checking to the go_sync
family of glops functions.

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