Don't verify s_inodes_count is correct with EXT2_FLAG_IGNORE_SB_ERRORS
flag set. This allows e2fsck and debugfs to fix this value.
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
goto cleanup;
}
fs->group_desc_count = groups_cnt;
- if ((__u64)fs->group_desc_count * EXT2_INODES_PER_GROUP(fs->super) !=
+ if (!(flags & EXT2_FLAG_IGNORE_SB_ERRORS) &&
+ (__u64)fs->group_desc_count * EXT2_INODES_PER_GROUP(fs->super) !=
fs->super->s_inodes_count) {
retval = EXT2_ET_CORRUPT_SUPERBLOCK;
goto cleanup;