diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/ext4_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 621c61e5c79..31952f48b90 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -432,6 +432,10 @@ uint16_t ext4fs_checksum_update(uint32_t i) crc = ext2fs_crc16(crc, desc, offset); offset += sizeof(desc->bg_checksum); /* skip checksum */ assert(offset == sizeof(*desc)); + if (offset < fs->gdsize) { + crc = ext2fs_crc16(crc, (__u8 *)desc + offset, + fs->gdsize - offset); + } } return crc; |