aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/util.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2022-08-18 13:32:37 -0500
committerAndreas Gruenbacher <agruenba@redhat.com>2022-08-25 17:11:14 +0200
commit053640a73838400dca23087d66a9c0db579adafb (patch)
tree42169cec2192266f57afe4c1228a3d3c96f471d2 /fs/gfs2/util.c
parent04133b607a78f2fd3daadbe5519513942b0f3a05 (diff)
downloadlinux-053640a73838400dca23087d66a9c0db579adafb.tar.gz
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>
Diffstat (limited to 'fs/gfs2/util.c')
-rw-r--r--fs/gfs2/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c
index 95c79a3ec1612d..88185a34150400 100644
--- a/fs/gfs2/util.c
+++ b/fs/gfs2/util.c
@@ -164,6 +164,11 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp)
}
if (!ret)
gfs2_make_fs_ro(sdp);
+ /*
+ * Dequeue any pending non-system glock holders that can no
+ * longer be granted because the file system is withdrawn.
+ */
+ gfs2_gl_dq_holders(sdp);
gfs2_freeze_unlock(&freeze_gh);
}