Commit f458aafc authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

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: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent b89e487b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -596,6 +596,9 @@ static void gfs2_put_super(struct super_block *sb)
	}
	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 @@ static void gfs2_put_super(struct super_block *sb)
		gfs2_quota_cleanup(sdp);
	}

	flush_work(&sdp->sd_withdraw_work);

	/*  At this point, we're through modifying the disk  */

	/*  Release stuff  */