aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 541bd9adffa2..ed8482e22c0e 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2961,15 +2961,10 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
2961 + le32_to_cpu(es->s_first_data_block); 2961 + le32_to_cpu(es->s_first_data_block);
2962 2962
2963 len = ac->ac_b_ex.fe_len; 2963 len = ac->ac_b_ex.fe_len;
2964 if (in_range(ext4_block_bitmap(sb, gdp), block, len) || 2964 if (!ext4_data_block_valid(sbi, block, len)) {
2965 in_range(ext4_inode_bitmap(sb, gdp), block, len) ||
2966 in_range(block, ext4_inode_table(sb, gdp),
2967 EXT4_SB(sb)->s_itb_per_group) ||
2968 in_range(block + len - 1, ext4_inode_table(sb, gdp),
2969 EXT4_SB(sb)->s_itb_per_group)) {
2970 ext4_error(sb, __func__, 2965 ext4_error(sb, __func__,
2971 "Allocating block %llu in system zone of %d group\n", 2966 "Allocating blocks %llu-%llu which overlap "
2972 block, ac->ac_b_ex.fe_group); 2967 "fs metadata\n", block, block+len);
2973 /* File system mounted not to panic on error 2968 /* File system mounted not to panic on error
2974 * Fix the bitmap and repeat the block allocation 2969 * Fix the bitmap and repeat the block allocation
2975 * We leak some of the blocks here. 2970 * We leak some of the blocks here.