diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 9b9e70f14d25..56bc966531f2 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1592,6 +1592,7 @@ static int gfs2_reconfigure(struct fs_context *fc) if ((sb->s_flags ^ fc->sb_flags) & SB_RDONLY) { if (fc->sb_flags & SB_RDONLY) { gfs2_make_fs_ro(sdp); + gfs2_quota_cleanup(sdp); } else { error = gfs2_make_fs_rw(sdp); if (error) diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 4d854556b529..e13c9f9efe6c 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -565,7 +565,6 @@ void gfs2_make_fs_ro(struct gfs2_sbd *sdp) HZ * 5); gfs2_assert_warn(sdp, gfs2_log_is_empty(sdp)); } - gfs2_quota_cleanup(sdp); } /** @@ -604,8 +603,6 @@ static void gfs2_put_super(struct super_block *sb) else { if (gfs2_withdrawn(sdp)) gfs2_destroy_threads(sdp); - - gfs2_quota_cleanup(sdp); } /* At this point, we're through modifying the disk */ @@ -637,6 +634,8 @@ static void gfs2_put_super(struct super_block *sb) gfs2_glock_dq_uninit(&sdp->sd_live_gh); gfs2_clear_rgrpd(sdp); gfs2_jindex_free(sdp); + + gfs2_quota_cleanup(sdp); /* Take apart glock structures and buffer lists */ gfs2_gl_hash_clear(sdp); iput(sdp->sd_inode);