Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2432,7 +2432,6 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p,
	btrfs_unlock_up_safe(p, level + 1);
	btrfs_set_path_blocking(p);

	free_extent_buffer(tmp);
	if (p->reada != READA_NONE)
		reada_for_search(fs_info, p, level, slot, key->objectid);