diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2012-02-16 07:23:58 (GMT) |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2012-02-16 16:23:17 (GMT) |
commit | 285190d99fef696ec8b0041787387f013cb71d67 (patch) | |
tree | d55c5e3f71718cb21f9349280fb160d0403d082d /fs/btrfs/compression.c | |
parent | 600a45e1d5e376f679ff9ecc4ce9452710a6d27c (diff) | |
download | linux-285190d99fef696ec8b0041787387f013cb71d67.tar.xz |
Btrfs: check return value of lookup_extent_mapping() correctly
This patch corrects error checking of lookup_extent_mapping().
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 14f1c5a..d02c27c 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -588,6 +588,8 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, page_offset(bio->bi_io_vec->bv_page), PAGE_CACHE_SIZE); read_unlock(&em_tree->lock); + if (!em) + return -EIO; compressed_len = em->block_len; cb = kmalloc(compressed_bio_size(root, compressed_len), GFP_NOFS); |