summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c61675d62195..4d34430d75f6 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3139,13 +3139,22 @@ static ext4_group_t ext4_has_uninit_itable(struct super_block *sb)
3139 ext4_group_t group, ngroups = EXT4_SB(sb)->s_groups_count; 3139 ext4_group_t group, ngroups = EXT4_SB(sb)->s_groups_count;
3140 struct ext4_group_desc *gdp = NULL; 3140 struct ext4_group_desc *gdp = NULL;
3141 3141
3142 if (!ext4_has_group_desc_csum(sb))
3143 return ngroups;
3144
3142 for (group = 0; group < ngroups; group++) { 3145 for (group = 0; group < ngroups; group++) {
3143 gdp = ext4_get_group_desc(sb, group, NULL); 3146 gdp = ext4_get_group_desc(sb, group, NULL);
3144 if (!gdp) 3147 if (!gdp)
3145 continue; 3148 continue;
3146 3149
3147 if (!(gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED))) 3150 if (gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED))
3151 continue;
3152 if (group != 0)
3148 break; 3153 break;
3154 ext4_error(sb, "Inode table for bg 0 marked as "
3155 "needing zeroing");
3156 if (sb_rdonly(sb))
3157 return ngroups;
3149 } 3158 }
3150 3159
3151 return group; 3160 return group;