ref: 29a73e9885259417b092353ca98efead05b4ad99
parent: 2aa6b585955b0133b6191f7a387e41ead358f136
author: ngkaho1234 <[email protected]>
date: Tue Oct 27 14:06:26 EDT 2015
FIX: potential checksum failed bug in ext4_extent_full.c when METADATA_CSUM is not enabled
--- a/lwext4/ext4_extent_full.c
+++ b/lwext4/ext4_extent_full.c
@@ -409,8 +409,11 @@
}
tail = find_ext4_extent_tail(eh);
- if (tail->et_checksum != to_le32(ext4_ext_block_csum(inode_ref, eh))) {
- /* FIXME: Warning: extent checksum damaged? */
+ if (ext4_sb_has_feature_read_only(&inode_ref->fs->sb,
+ EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) {
+ if (tail->et_checksum != to_le32(ext4_ext_block_csum(inode_ref, eh))) {
+ /* FIXME: Warning: extent checksum damaged? */
+ }
}
return EOK;