diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2012-04-29 18:35:10 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-04-29 18:35:10 -0400 |
commit | fa77dcfafeaa6bc73293c646bfc3d5192dcf0be2 (patch) | |
tree | 66c4232c2e5c1f59666e05164b77539a9b1dd290 /fs/ext4/resize.c | |
parent | 41a246d1ff75a95d2be3191ca6e6db139dc0f430 (diff) |
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/resize.c')
-rw-r--r-- | fs/ext4/resize.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 7810cac241e1..dc597e066308 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -1107,6 +1107,13 @@ static int ext4_set_bitmap_checksums(struct super_block *sb, | |||
1107 | EXT4_INODES_PER_GROUP(sb) / 8); | 1107 | EXT4_INODES_PER_GROUP(sb) / 8); |
1108 | brelse(bh); | 1108 | brelse(bh); |
1109 | 1109 | ||
1110 | bh = ext4_get_bitmap(sb, group_data->block_bitmap); | ||
1111 | if (!bh) | ||
1112 | return -EIO; | ||
1113 | ext4_block_bitmap_csum_set(sb, group, gdp, bh, | ||
1114 | EXT4_BLOCKS_PER_GROUP(sb) / 8); | ||
1115 | brelse(bh); | ||
1116 | |||
1110 | return 0; | 1117 | return 0; |
1111 | } | 1118 | } |
1112 | 1119 | ||