OSDN Git Service

ext4: do not try to write superblock on ro remount w/o journal
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / fs / ext4 / super.c
index 4969167..183ae34 100644 (file)
@@ -4729,7 +4729,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
        }
 
        ext4_setup_system_zone(sb);
-       if (sbi->s_journal == NULL)
+       if (sbi->s_journal == NULL && !(old_sb_flags & MS_RDONLY))
                ext4_commit_super(sb, 1);
 
 #ifdef CONFIG_QUOTA