summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--e2fsck/journal.c2
-rw-r--r--e2fsck/pass2.c2
-rw-r--r--e2fsck/super.c3
-rw-r--r--e2fsck/unix.c1
4 files changed, 7 insertions, 1 deletions
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index 756bbcb2..dbe1bf11 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -454,6 +454,7 @@ static errcode_t e2fsck_journal_fix_bad_inode(e2fsck_t ctx,
sb->s_feature_compat &= ~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
sb->s_journal_inum = 0;
ctx->flags |= E2F_FLAG_JOURNAL_INODE;
+ ctx->fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
e2fsck_clear_recover(ctx, 1);
return 0;
}
@@ -753,6 +754,7 @@ no_has_journal:
e2fsck_clear_recover(ctx, force_fsck);
} else if (!(ctx->options & E2F_OPT_READONLY)) {
sb->s_feature_compat |= EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ ctx->fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
ext2fs_mark_super_dirty(ctx->fs);
}
}
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index 5e088e2d..f58e5a96 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -267,6 +267,7 @@ void e2fsck_pass2(e2fsck_t ctx)
fix_problem(ctx, PR_2_FEATURE_LARGE_FILES, &pctx)) {
sb->s_feature_ro_compat |=
EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
ext2fs_mark_super_dirty(fs);
}
if (sb->s_rev_level == EXT2_GOOD_OLD_REV &&
@@ -280,6 +281,7 @@ void e2fsck_pass2(e2fsck_t ctx)
if (fs->flags & EXT2_FLAG_RW) {
sb->s_feature_ro_compat &=
~EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
ext2fs_mark_super_dirty(fs);
}
}
diff --git a/e2fsck/super.c b/e2fsck/super.c
index e90e9610..b4ddca20 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -682,7 +682,7 @@ void check_super_block(e2fsck_t ctx)
fs->super->s_feature_incompat &=
~EXT2_FEATURE_INCOMPAT_FILETYPE;
ext2fs_mark_super_dirty(fs);
-
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
}
}
@@ -700,6 +700,7 @@ void check_super_block(e2fsck_t ctx)
fix_problem(ctx, PR_0_FS_REV_LEVEL, &pctx)) {
ext2fs_update_dynamic_rev(fs);
ext2fs_mark_super_dirty(fs);
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
}
check_resize_inode(ctx);
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 72545dab..fbfd8e20 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1252,6 +1252,7 @@ restart:
if (journal_size < 0) {
fs->super->s_feature_compat &=
~EXT3_FEATURE_COMPAT_HAS_JOURNAL;
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
com_err(ctx->program_name, 0,
_("Couldn't determine journal size"));
goto no_journal;