mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
btrfs: fix error pointer check in __btrfs_map_block()
The btrfs_get_chunk_map() never returns NULL, it returns error pointers.
Fixes: 89b798ad1b
("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>
This commit is contained in:
parent
3b80a984d2
commit
f11369897e
1 changed files with 1 additions and 1 deletions
|
@ -6023,7 +6023,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
em = btrfs_get_chunk_map(fs_info, logical, *length);
|
em = btrfs_get_chunk_map(fs_info, logical, *length);
|
||||||
ASSERT(em);
|
ASSERT(!IS_ERR(em));
|
||||||
map = em->map_lookup;
|
map = em->map_lookup;
|
||||||
|
|
||||||
*length = geom.len;
|
*length = geom.len;
|
||||||
|
|
Loading…
Reference in a new issue