]> Gentwo Git Trees - linux/.git/commit
gfs2: Clean up properly during a withdraw
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 4 Aug 2025 22:07:02 +0000 (00:07 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 26 Nov 2025 23:52:27 +0000 (23:52 +0000)
commit0e10da69d1671109b2ae5ed3eed6aa44b5ee64bc
tree3d97f210649dffa03c1caf99769171ede699a792
parent473678ccb97dabeebc802d01a7f5c80e3a82b04c
gfs2: Clean up properly during a withdraw

During a withdraw, we don't want to write out any more data than we have
to, so in do_xmote(), skip the ->go_sync() glock operation.  We still
want to keep calling ->go_inval() to discard any cached data or
metadata, whether clean or dirty.

We do still allow glocks to transition into state LM_ST_UNLOCKED.  This
has the desired side effect of calling ->go_inval() and invalidating the
glock caches.

Function gfs2_withdraw_glocks() is already used for dequeuing any
left-over waiters.  We still want that to happen, but additionally, we
want all glocks to be unlocked.

Finally, we change function do_promote() to refuse any further
promotions.

This commit cleans up the leftovers of commit 86934198eefa ("gfs2: Clear
flags when withdraw prevents xmote").

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