ext4: fix condition of validate s_first_meta_bg

Fixes: ext4: validate s_first_meta_bg at mount time

Change-Id: Iea0fb0df71502c5578c3c96e992d6cc78842ca7e
This commit is contained in:
syphyr 2017-06-11 00:40:19 +02:00 committed by Luca Stefani
parent f9b8387a82
commit 3c1f3051da
1 changed files with 1 additions and 1 deletions

View File

@ -3804,7 +3804,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
(EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb)));
db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
EXT4_DESC_PER_BLOCK(sb);
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_META_BG)) {
if (le32_to_cpu(es->s_first_meta_bg) >= db_count) {
ext4_msg(sb, KERN_WARNING,
"first meta block group too large: %u "