summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-08-09 17:07:39 +0300
committerDavid Sterba <dsterba@suse.com>2019-09-09 15:59:12 +0300
commitf11369897ed4f8609cdee00d3af47c18fe6bda29 (patch)
tree2e8432db54f8581b6150eb1ec1930fac2eb82615 /fs/btrfs
parent3b80a984d2283e6f1dc59571e5aadc36eadac939 (diff)
downloadlinux-f11369897ed4f8609cdee00d3af47c18fe6bda29.tar.xz
btrfs: fix error pointer check in __btrfs_map_block()
The btrfs_get_chunk_map() never returns NULL, it returns error pointers. Fixes: 89b798ad1b42 ("btrfs: Use btrfs_get_io_geometry appropriately") Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 48526923c17c..e2de7c7b674a 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6023,7 +6023,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
return ret;
em = btrfs_get_chunk_map(fs_info, logical, *length);
- ASSERT(em);
+ ASSERT(!IS_ERR(em));
map = em->map_lookup;
*length = geom.len;