]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gfs2: wait for withdraw earlier during unmount
authorAndreas Gruenbacher <agruenba@redhat.com>
Sun, 5 Apr 2026 22:25:42 +0000 (00:25 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 7 Apr 2026 20:20:00 +0000 (22:20 +0200)
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>
fs/gfs2/super.c

index 83b5bab56377616934e592aa2be1caab649470cc..b0b0bc5c9d2026f7ae00a0b533a296004f021165 100644 (file)
@@ -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  */