aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/super.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a221f1cdf704..92092b55db1e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4075,6 +4075,14 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
4075 sbi->s_groups_count = blocks_count; 4075 sbi->s_groups_count = blocks_count;
4076 sbi->s_blockfile_groups = min_t(ext4_group_t, sbi->s_groups_count, 4076 sbi->s_blockfile_groups = min_t(ext4_group_t, sbi->s_groups_count,
4077 (EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb))); 4077 (EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb)));
4078 if (((u64)sbi->s_groups_count * sbi->s_inodes_per_group) !=
4079 le32_to_cpu(es->s_inodes_count)) {
4080 ext4_msg(sb, KERN_ERR, "inodes count not valid: %u vs %llu",
4081 le32_to_cpu(es->s_inodes_count),
4082 ((u64)sbi->s_groups_count * sbi->s_inodes_per_group));
4083 ret = -EINVAL;
4084 goto failed_mount;
4085 }
4078 db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) / 4086 db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
4079 EXT4_DESC_PER_BLOCK(sb); 4087 EXT4_DESC_PER_BLOCK(sb);
4080 if (ext4_has_feature_meta_bg(sb)) { 4088 if (ext4_has_feature_meta_bg(sb)) {
@@ -4094,14 +4102,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
4094 ret = -ENOMEM; 4102 ret = -ENOMEM;
4095 goto failed_mount; 4103 goto failed_mount;
4096 } 4104 }
4097 if (((u64)sbi->s_groups_count * sbi->s_inodes_per_group) !=
4098 le32_to_cpu(es->s_inodes_count)) {
4099 ext4_msg(sb, KERN_ERR, "inodes count not valid: %u vs %llu",
4100 le32_to_cpu(es->s_inodes_count),
4101 ((u64)sbi->s_groups_count * sbi->s_inodes_per_group));
4102 ret = -EINVAL;
4103 goto failed_mount;
4104 }
4105 4105
4106 bgl_lock_init(sbi->s_blockgroup_lock); 4106 bgl_lock_init(sbi->s_blockgroup_lock);
4107 4107