diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2012-02-16 02:23:58 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2012-02-16 11:23:17 -0500 |
commit | 285190d99fef696ec8b0041787387f013cb71d67 (patch) | |
tree | d55c5e3f71718cb21f9349280fb160d0403d082d /fs/btrfs/volumes.c | |
parent | 600a45e1d5e376f679ff9ecc4ce9452710a6d27c (diff) |
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/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index d8f282b5baa9..cd040bf3fd87 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1954,7 +1954,7 @@ static int btrfs_relocate_chunk(struct btrfs_root *root, | |||
1954 | em = lookup_extent_mapping(em_tree, chunk_offset, 1); | 1954 | em = lookup_extent_mapping(em_tree, chunk_offset, 1); |
1955 | read_unlock(&em_tree->lock); | 1955 | read_unlock(&em_tree->lock); |
1956 | 1956 | ||
1957 | BUG_ON(em->start > chunk_offset || | 1957 | BUG_ON(!em || em->start > chunk_offset || |
1958 | em->start + em->len < chunk_offset); | 1958 | em->start + em->len < chunk_offset); |
1959 | map = (struct map_lookup *)em->bdev; | 1959 | map = (struct map_lookup *)em->bdev; |
1960 | 1960 | ||