gfs2: Dequeue waiters when withdrawn
authorBob Peterson <rpeterso@redhat.com>
Thu, 18 Aug 2022 18:32:37 +0000 (13:32 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 25 Aug 2022 15:11:14 +0000 (17:11 +0200)
commit053640a73838400dca23087d66a9c0db579adafb
tree42169cec2192266f57afe4c1228a3d3c96f471d2
parent04133b607a78f2fd3daadbe5519513942b0f3a05
gfs2: Dequeue waiters when withdrawn

When a withdraw occurs, ordinary (not system) glocks may not be granted
anymore. Later, when the file system is unmounted, gfs2_gl_hash_clear()
tries to clear out all the glocks, but these un-grantable pending
waiters prevent some glocks from being freed. So the unmount hangs, at
least for its ten-minute timeout period.

This patch takes measures to remove any pending waiters from
the glocks that will never be granted. This allows the unmount to
proceed in a reasonable period of time.

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