btrfs: lzo: Harden inline lzo compressed extent decompression
authorQu Wenruo <wqu@suse.com>
Thu, 17 May 2018 06:10:29 +0000 (14:10 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 30 May 2018 14:46:43 +0000 (16:46 +0200)
commitde885e3ee281a88f52283c7e8994e762e3a5f6bd
tree0a46bf7e4fdfc860b39de3fc76cd162d14749290
parent314bfa473b6b6d3efe68011899bd718b349f29d7
btrfs: lzo: Harden inline lzo compressed extent decompression

For inlined extent, we only have one segment, thus less things to check.
And further more, inlined extent always has the csum in its leaf header,
it's less probable to have corrupted data.

Anyway, still check header and segment header.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/lzo.c