aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext2/super.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index a304c544571f..f28a7ad02af9 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -606,7 +606,6 @@ static int ext2_setup_super (struct super_block * sb,
606 if (!le16_to_cpu(es->s_max_mnt_count)) 606 if (!le16_to_cpu(es->s_max_mnt_count))
607 es->s_max_mnt_count = cpu_to_le16(EXT2_DFL_MAX_MNT_COUNT); 607 es->s_max_mnt_count = cpu_to_le16(EXT2_DFL_MAX_MNT_COUNT);
608 le16_add_cpu(&es->s_mnt_count, 1); 608 le16_add_cpu(&es->s_mnt_count, 1);
609 ext2_write_super(sb);
610 if (test_opt (sb, DEBUG)) 609 if (test_opt (sb, DEBUG))
611 ext2_msg(sb, KERN_INFO, "%s, %s, bs=%lu, fs=%lu, gc=%lu, " 610 ext2_msg(sb, KERN_INFO, "%s, %s, bs=%lu, fs=%lu, gc=%lu, "
612 "bpg=%lu, ipg=%lu, mo=%04lx]", 611 "bpg=%lu, ipg=%lu, mo=%04lx]",
@@ -1079,7 +1078,9 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
1079 if (EXT2_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) 1078 if (EXT2_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL))
1080 ext2_msg(sb, KERN_WARNING, 1079 ext2_msg(sb, KERN_WARNING,
1081 "warning: mounting ext3 filesystem as ext2"); 1080 "warning: mounting ext3 filesystem as ext2");
1082 ext2_setup_super (sb, es, sb->s_flags & MS_RDONLY); 1081 if (ext2_setup_super (sb, es, sb->s_flags & MS_RDONLY))
1082 sb->s_flags |= MS_RDONLY;
1083 ext2_write_super(sb);
1083 return 0; 1084 return 0;
1084 1085
1085cantfind_ext2: 1086cantfind_ext2:
@@ -1238,6 +1239,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
1238 */ 1239 */
1239 es->s_state = cpu_to_le16(sbi->s_mount_state); 1240 es->s_state = cpu_to_le16(sbi->s_mount_state);
1240 es->s_mtime = cpu_to_le32(get_seconds()); 1241 es->s_mtime = cpu_to_le32(get_seconds());
1242 ext2_sync_super(sb, es, 1);
1241 } else { 1243 } else {
1242 __le32 ret = EXT2_HAS_RO_COMPAT_FEATURE(sb, 1244 __le32 ret = EXT2_HAS_RO_COMPAT_FEATURE(sb,
1243 ~EXT2_FEATURE_RO_COMPAT_SUPP); 1245 ~EXT2_FEATURE_RO_COMPAT_SUPP);
@@ -1257,8 +1259,8 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
1257 sbi->s_mount_state = le16_to_cpu(es->s_state); 1259 sbi->s_mount_state = le16_to_cpu(es->s_state);
1258 if (!ext2_setup_super (sb, es, 0)) 1260 if (!ext2_setup_super (sb, es, 0))
1259 sb->s_flags &= ~MS_RDONLY; 1261 sb->s_flags &= ~MS_RDONLY;
1262 ext2_write_super(sb);
1260 } 1263 }
1261 ext2_sync_super(sb, es, 1);
1262 unlock_kernel(); 1264 unlock_kernel();
1263 return 0; 1265 return 0;
1264restore_opts: 1266restore_opts: