Btrfs: remove superfluous free_extent_buffer in read_block_for_search
authorLiu Bo <bo.liu@linux.alibaba.com>
Fri, 18 May 2018 03:00:19 +0000 (11:00 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 30 May 2018 14:46:44 +0000 (16:46 +0200)
commitca19b4a69962fa850d5a22aa7a335106fcba0473
tree496ae6ca6bb880e10b2743443636e0e6c5d45421
parent4ca616832783ce6563b59b2d4764fdbb272e0362
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: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c