]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Clear flags when withdraw prevents xmote
authorBob Peterson <rpeterso@redhat.com>
Thu, 18 Aug 2022 18:32:38 +0000 (13:32 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 25 Aug 2022 15:11:39 +0000 (17:11 +0200)
commit7d9d62cafa4b877af8e23a27a489d936b00e6fd4
tree83721033c4e294704fcc645aaf62b703bd1f952d
parentda7fb5d2a8786c6286714aee5d1c88b75f50c3a7
gfs2: Clear flags when withdraw prevents xmote

There are a couple places in function do_xmote where normal processing
is circumvented due to withdraws in progress. However, since we bypass
most of do_xmote() we bypass telling dlm to lock the dlm lock, which
means dlm will never respond with a completion callback. Since the
completion callback ordinarily clears GLF_LOCK, this patch changes
function do_xmote to handle those situations more gracefully so the
file system may be unmounted after withdraw.

A very similar situation happens with the GLF_DEMOTE_IN_PROGRESS flag,
which is cleared by function finish_xmote(). Since the withdraw causes
us to skip the majority of do_xmote, it therefore also skips the call
to finish_xmote() so the DEMOTE_IN_PROGRESS flag needs to be cleared
manually.

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