aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/ialloc.c5
-rw-r--r--fs/ext4/super.c8
2 files changed, 5 insertions, 8 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index e9d8e2667ab5..f336cbc6e932 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -1388,7 +1388,10 @@ int ext4_init_inode_table(struct super_block *sb, ext4_group_t group,
1388 ext4_itable_unused_count(sb, gdp)), 1388 ext4_itable_unused_count(sb, gdp)),
1389 sbi->s_inodes_per_block); 1389 sbi->s_inodes_per_block);
1390 1390
1391 if ((used_blks < 0) || (used_blks > sbi->s_itb_per_group)) { 1391 if ((used_blks < 0) || (used_blks > sbi->s_itb_per_group) ||
1392 ((group == 0) && ((EXT4_INODES_PER_GROUP(sb) -
1393 ext4_itable_unused_count(sb, gdp)) <
1394 EXT4_FIRST_INO(sb)))) {
1392 ext4_error(sb, "Something is wrong with group %u: " 1395 ext4_error(sb, "Something is wrong with group %u: "
1393 "used itable blocks: %d; " 1396 "used itable blocks: %d; "
1394 "itable unused count: %u", 1397 "itable unused count: %u",
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 680526e9ee96..b7f7922061be 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3141,14 +3141,8 @@ static ext4_group_t ext4_has_uninit_itable(struct super_block *sb)
3141 if (!gdp) 3141 if (!gdp)
3142 continue; 3142 continue;
3143 3143
3144 if (gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED)) 3144 if (!(gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED)))
3145 continue;
3146 if (group != 0)
3147 break; 3145 break;
3148 ext4_error(sb, "Inode table for bg 0 marked as "
3149 "needing zeroing");
3150 if (sb_rdonly(sb))
3151 return ngroups;
3152 } 3146 }
3153 3147
3154 return group; 3148 return group;