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

Btrfs: remove superfluous free_extent_buffer in read_block_for_search

read_block_for_search() can be simplified as:

tmp = find_extent_buffer();
if (tmp)
   return;

...

free_extent_buffer();
read_tree_block();

Apparently, @tmp must be NULL at this point, free_extent_buffer() is not
needed.
Signed-off-by: default avatarLiu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4ca61683
...@@ -2432,7 +2432,6 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p, ...@@ -2432,7 +2432,6 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p,
btrfs_unlock_up_safe(p, level + 1); btrfs_unlock_up_safe(p, level + 1);
btrfs_set_path_blocking(p); btrfs_set_path_blocking(p);
free_extent_buffer(tmp);
if (p->reada != READA_NONE) if (p->reada != READA_NONE)
reada_for_search(fs_info, p, level, slot, key->objectid); reada_for_search(fs_info, p, level, slot, key->objectid);
......
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