Commit bee6ec82 authored by Liu Bo's avatar Liu Bo Committed by David Sterba

Btrfs: remove always true if branch in btrfs_get_extent

@path is always NULL when it comes to the if branch.
Signed-off-by: default avatarLiu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9c7b0c2e
...@@ -6821,18 +6821,14 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode, ...@@ -6821,18 +6821,14 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
em->len = (u64)-1; em->len = (u64)-1;
em->block_len = (u64)-1; em->block_len = (u64)-1;
if (!path) {
path = btrfs_alloc_path(); path = btrfs_alloc_path();
if (!path) { if (!path) {
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
/*
* Chances are we'll be called again, so go ahead and do /* Chances are we'll be called again, so go ahead and do readahead */
* readahead
*/
path->reada = READA_FORWARD; path->reada = READA_FORWARD;
}
ret = btrfs_lookup_file_extent(NULL, root, path, objectid, start, 0); ret = btrfs_lookup_file_extent(NULL, root, path, objectid, start, 0);
if (ret < 0) { if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment