The subject is too generic, and the changelog could say something about
the btrfs_panic semantics. Otherwise the change is ok, previously there
was just BUG_ON, then if -> btrfs_panic and after moving the kfree after
the print, the return has been added, but this is just redundant.

On Wed, Jul 12, 2017 at 09:13:58AM +0300, Nikolay Borisov wrote:
> Signed-off-by: Nikolay Borisov <[email protected]>
> ---
>  fs/btrfs/relocation.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 65661d1aae4e..1a532bb72eab 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -1308,8 +1308,6 @@ static int __must_check __add_reloc_root(struct 
> btrfs_root *root)
>               btrfs_panic(fs_info, -EEXIST,
>                           "Duplicate root found for start=%llu while 
> inserting into relocation tree",
>                           node->bytenr);
> -             kfree(node);
> -             return -EEXIST;
>       }
>  
>       list_add_tail(&root->root_list, &rc->reloc_roots);
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to