From: Liu Bo Date: Fri, 18 May 2018 03:00:19 +0000 (+0800) Subject: Btrfs: remove superfluous free_extent_buffer in read_block_for_search X-Git-Tag: v4.19~584^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca19b4a69962fa850d5a22aa7a335106fcba0473;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 8c68961..820226d 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -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);