mirror of https://gitee.com/openkylin/linux.git
Btrfs: remove always true if branch in btrfs_get_extent
@path is always NULL when it comes to the if branch. Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9c7b0c2e8d
commit
bee6ec822a
|
@ -6821,19 +6821,15 @@ 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;
|
||||||
|
|
||||||
|
path = btrfs_alloc_path();
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = btrfs_alloc_path();
|
err = -ENOMEM;
|
||||||
if (!path) {
|
goto out;
|
||||||
err = -ENOMEM;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Chances are we'll be called again, so go ahead and do
|
|
||||||
* readahead
|
|
||||||
*/
|
|
||||||
path->reada = READA_FORWARD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Chances are we'll be called again, so go ahead and do readahead */
|
||||||
|
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) {
|
||||||
err = ret;
|
err = ret;
|
||||||
|
|
Loading…
Reference in New Issue