A recent commit,
d74eb7ef: "e2fsck: handle s_inodes_count corruption
properly" tries to fix s_inodes_count. However, if the user declines
to fix the invalid s_inodes_count, e2fsck needs to abort since
otherwise we can crash due to the insane s_inodes_count.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
if (fix_problem(ctx, PR_0_INODE_COUNT_WRONG, &pctx)) {
sb->s_inodes_count = should_be;
ext2fs_mark_super_dirty(fs);
+ } else {
+ pctx.num = sb->s_inodes_count;
+ pctx.str = "inodes_count";
+ fix_problem(ctx, PR_0_MISC_CORRUPT_SUPER, &pctx);
+ ctx->flags |= E2F_FLAG_ABORT;
+ return;
}
}
if (sb->s_rev_level > EXT2_GOOD_OLD_REV &&