]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ext4: update inline int ext4_has_metadata_csum(struct super_block *sb)
authorJohn Donnelly <john.p.donnelly@oracle.com>
Mon, 7 Jan 2019 18:10:50 +0000 (10:10 -0800)
committerBrian Maly <brian.maly@oracle.com>
Mon, 14 Jan 2019 17:22:03 +0000 (12:22 -0500)
 to include ext4_has_feature_metadata_csum(sb) check.

Orabug: 29114440
CVE: CVE-2018-1094

Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
fs/ext4/ext4.h

index d3ccdf3f2795f5401687f0ce1c721c290d29850f..dc9378e35468075966c5f180baeb69b17225edad 100644 (file)
@@ -2648,7 +2648,8 @@ static inline int ext4_has_metadata_csum(struct super_block *sb)
        WARN_ON_ONCE(ext4_has_feature_metadata_csum(sb) &&
                     !EXT4_SB(sb)->s_chksum_driver);
 
-       return (EXT4_SB(sb)->s_chksum_driver != NULL);
+       return  ext4_has_feature_metadata_csum(sb) &&
+                       (EXT4_SB(sb)->s_chksum_driver != NULL);
 }
 static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)
 {