提交 f1136989 编写于 作者: D Dan Carpenter 提交者: David Sterba

btrfs: fix error pointer check in __btrfs_map_block()

The btrfs_get_chunk_map() never returns NULL, it returns error pointers.

Fixes: 89b798ad ("btrfs: Use btrfs_get_io_geometry appropriately")
Reviewed-by: NNikolay Borisov <nborisov@suse.com>
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 3b80a984
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册