Skip to content

Commit f458aaf

Browse files
author
Andreas Gruenbacher
committed
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>
1 parent b89e487 commit f458aaf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

fs/gfs2/super.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ static void gfs2_put_super(struct super_block *sb)
596596
}
597597
spin_unlock(&sdp->sd_jindex_spin);
598598

599+
/* Wait for withdraw to complete */
600+
flush_work(&sdp->sd_withdraw_work);
601+
599602
if (!sb_rdonly(sb))
600603
gfs2_make_fs_ro(sdp);
601604
else {
@@ -605,8 +608,6 @@ static void gfs2_put_super(struct super_block *sb)
605608
gfs2_quota_cleanup(sdp);
606609
}
607610

608-
flush_work(&sdp->sd_withdraw_work);
609-
610611
/* At this point, we're through modifying the disk */
611612

612613
/* Release stuff */

0 commit comments

Comments
 (0)