On 2018年05月18日 11:00, Liu Bo wrote:
> 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....@linux.alibaba.com>

Reviewed-by: Qu wenruo <w...@suse.com>

Thanks,
Qu
> ---
>  fs/btrfs/ctree.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index b3f6f300e492..9fa3d77c98d4 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -2432,7 +2432,6 @@ noinline void btrfs_unlock_up_safe(struct btrfs_path 
> *path, int level)
>       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);
>  
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to