diff options
-rw-r--r-- | fs/ext4/super.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1e26f4a0b555..626c1f840118 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -836,9 +836,6 @@ static void ext4_put_super(struct super_block *sb) | |||
836 | destroy_workqueue(sbi->dio_unwritten_wq); | 836 | destroy_workqueue(sbi->dio_unwritten_wq); |
837 | 837 | ||
838 | lock_super(sb); | 838 | lock_super(sb); |
839 | if (sb->s_dirt) | ||
840 | ext4_commit_super(sb, 1); | ||
841 | |||
842 | if (sbi->s_journal) { | 839 | if (sbi->s_journal) { |
843 | err = jbd2_journal_destroy(sbi->s_journal); | 840 | err = jbd2_journal_destroy(sbi->s_journal); |
844 | sbi->s_journal = NULL; | 841 | sbi->s_journal = NULL; |
@@ -855,8 +852,10 @@ static void ext4_put_super(struct super_block *sb) | |||
855 | if (!(sb->s_flags & MS_RDONLY)) { | 852 | if (!(sb->s_flags & MS_RDONLY)) { |
856 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); | 853 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); |
857 | es->s_state = cpu_to_le16(sbi->s_mount_state); | 854 | es->s_state = cpu_to_le16(sbi->s_mount_state); |
858 | ext4_commit_super(sb, 1); | ||
859 | } | 855 | } |
856 | if (sb->s_dirt || !(sb->s_flags & MS_RDONLY)) | ||
857 | ext4_commit_super(sb, 1); | ||
858 | |||
860 | if (sbi->s_proc) { | 859 | if (sbi->s_proc) { |
861 | remove_proc_entry("options", sbi->s_proc); | 860 | remove_proc_entry("options", sbi->s_proc); |
862 | remove_proc_entry(sb->s_id, ext4_proc_root); | 861 | remove_proc_entry(sb->s_id, ext4_proc_root); |