aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/balloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r--fs/ext4/balloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index a40b1f96c021..d9b66c4a26e8 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -356,6 +356,7 @@ void ext4_validate_block_bitmap(struct super_block *sb,
356 struct buffer_head *bh) 356 struct buffer_head *bh)
357{ 357{
358 ext4_fsblk_t blk; 358 ext4_fsblk_t blk;
359 struct ext4_group_info *grp = ext4_get_group_info(sb, block_group);
359 360
360 if (buffer_verified(bh)) 361 if (buffer_verified(bh))
361 return; 362 return;
@@ -366,12 +367,14 @@ void ext4_validate_block_bitmap(struct super_block *sb,
366 ext4_unlock_group(sb, block_group); 367 ext4_unlock_group(sb, block_group);
367 ext4_error(sb, "bg %u: block %llu: invalid block bitmap", 368 ext4_error(sb, "bg %u: block %llu: invalid block bitmap",
368 block_group, blk); 369 block_group, blk);
370 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &grp->bb_state);
369 return; 371 return;
370 } 372 }
371 if (unlikely(!ext4_block_bitmap_csum_verify(sb, block_group, 373 if (unlikely(!ext4_block_bitmap_csum_verify(sb, block_group,
372 desc, bh))) { 374 desc, bh))) {
373 ext4_unlock_group(sb, block_group); 375 ext4_unlock_group(sb, block_group);
374 ext4_error(sb, "bg %u: bad block bitmap checksum", block_group); 376 ext4_error(sb, "bg %u: bad block bitmap checksum", block_group);
377 set_bit(EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT, &grp->bb_state);
375 return; 378 return;
376 } 379 }
377 set_buffer_verified(bh); 380 set_buffer_verified(bh);