diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2012-04-29 22:35:10 (GMT) |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-04-29 22:35:10 (GMT) |
commit | fa77dcfafeaa6bc73293c646bfc3d5192dcf0be2 (patch) | |
tree | 66c4232c2e5c1f59666e05164b77539a9b1dd290 /fs/ext4/ialloc.c | |
parent | 41a246d1ff75a95d2be3191ca6e6db139dc0f430 (diff) | |
download | linux-fa77dcfafeaa6bc73293c646bfc3d5192dcf0be2.tar.xz |
ext4: calculate and verify block bitmap checksum
Compute and verify the checksum of the block bitmap; this checksum is
stored in the block group descriptor.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index fb897ec..a6383fc 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -753,6 +753,10 @@ got: gdp->bg_flags &= cpu_to_le16(~EXT4_BG_BLOCK_UNINIT); ext4_free_group_clusters_set(sb, gdp, ext4_free_clusters_after_init(sb, group, gdp)); + ext4_block_bitmap_csum_set(sb, group, gdp, + block_bitmap_bh, + EXT4_BLOCKS_PER_GROUP(sb) / + 8); gdp->bg_checksum = ext4_group_desc_csum(sbi, group, gdp); } |