Commit f8ee80de authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by David Sterba

btrfs: remove unneeded return variable in btrfs_lookup_file_extent

We can return from btrfs_search_slot directly which also shows that it
follows the same return value convention.
Signed-off-by: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ad9a9378
...@@ -233,7 +233,6 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, ...@@ -233,7 +233,6 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
struct btrfs_path *path, u64 objectid, struct btrfs_path *path, u64 objectid,
u64 offset, int mod) u64 offset, int mod)
{ {
int ret;
struct btrfs_key file_key; struct btrfs_key file_key;
int ins_len = mod < 0 ? -1 : 0; int ins_len = mod < 0 ? -1 : 0;
int cow = mod != 0; int cow = mod != 0;
...@@ -241,8 +240,8 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, ...@@ -241,8 +240,8 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
file_key.objectid = objectid; file_key.objectid = objectid;
file_key.offset = offset; file_key.offset = offset;
file_key.type = BTRFS_EXTENT_DATA_KEY; file_key.type = BTRFS_EXTENT_DATA_KEY;
ret = btrfs_search_slot(trans, root, &file_key, path, ins_len, cow);
return ret; return btrfs_search_slot(trans, root, &file_key, path, ins_len, cow);
} }
/* /*
......
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