summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2026-04-06 01:25:42 +0300
committerAndreas Gruenbacher <agruenba@redhat.com>2026-04-07 23:20:00 +0300
commitf458aafc5c2174407c46ea1aaec03a3a79957887 (patch)
tree8b3adef38de77e595b75ca2677862681b6d99597
parentb89e487bfcbc172e686a547fec4bc4072035a73b (diff)
downloadlinux-f458aafc5c2174407c46ea1aaec03a3a79957887.tar.xz
gfs2: wait for withdraw earlier during unmount
During an unmount, wait for potential withdraw to complete before calling gfs2_make_fs_ro(). This will allow gfs2_make_fs_ro() to skip much of its work. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
-rw-r--r--fs/gfs2/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 83b5bab56377..b0b0bc5c9d20 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -596,6 +596,9 @@ restart:
}
spin_unlock(&sdp->sd_jindex_spin);
+ /* Wait for withdraw to complete */
+ flush_work(&sdp->sd_withdraw_work);
+
if (!sb_rdonly(sb))
gfs2_make_fs_ro(sdp);
else {
@@ -605,8 +608,6 @@ restart:
gfs2_quota_cleanup(sdp);
}
- flush_work(&sdp->sd_withdraw_work);
-
/* At this point, we're through modifying the disk */
/* Release stuff */