From: Nikolay Borisov Date: Thu, 13 Jul 2017 11:11:07 +0000 (+0300) Subject: btrfs: Remove never reached error handling code in __add_reloc_root X-Git-Tag: v4.14-rc3~14^2~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3f3ad126829779a5ad0e7846cd52adf7cc180a9;p=platform%2Fkernel%2Flinux-rpi3.git btrfs: Remove never reached error handling code in __add_reloc_root One of the error handling paths in __add_reloc_root contains btrfs_panic() followed by some other code. As the name implies what it does is print some error message and call BUG, naturally what follow afterwards is not invoked. So remove this extra code. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 65661d1..1a532bb 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);