Skip to content

Commit

Permalink
btrfs: fix error pointer check in __btrfs_map_block()
Browse files Browse the repository at this point in the history
The btrfs_get_chunk_map() never returns NULL, it returns error pointers.

Fixes: 89b798a ("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>
  • Loading branch information
Dan Carpenter authored and David Sterba committed Sep 9, 2019
1 parent 3b80a98 commit f113698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f113698

Please sign in to comment.