diff options
author | Liu Bo <bo.liu@linux.alibaba.com> | 2018-05-17 23:00:19 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-30 10:46:44 -0400 |
commit | ca19b4a69962fa850d5a22aa7a335106fcba0473 (patch) | |
tree | 496ae6ca6bb880e10b2743443636e0e6c5d45421 | |
parent | 4ca616832783ce6563b59b2d4764fdbb272e0362 (diff) |
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>
-rw-r--r-- | fs/btrfs/ctree.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 8c68961925b1..820226d42d5d 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, | |||
2432 | btrfs_unlock_up_safe(p, level + 1); | 2432 | btrfs_unlock_up_safe(p, level + 1); |
2433 | btrfs_set_path_blocking(p); | 2433 | btrfs_set_path_blocking(p); |
2434 | 2434 | ||
2435 | free_extent_buffer(tmp); | ||
2436 | if (p->reada != READA_NONE) | 2435 | if (p->reada != READA_NONE) |
2437 | reada_for_search(fs_info, p, level, slot, key->objectid); | 2436 | reada_for_search(fs_info, p, level, slot, key->objectid); |
2438 | 2437 | ||