]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
btrfs: Remove never reached error handling code in __add_reloc_root
authorNikolay Borisov <nborisov@suse.com>
Thu, 13 Jul 2017 11:11:07 +0000 (14:11 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 16 Aug 2017 14:12:03 +0000 (16:12 +0200)
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 <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c

index 65661d1aae4e65c7314c98ad27d9139708e71103..1a532bb72eabdf6647f3ea23da4d7576d9fc5be8 100644 (file)
@@ -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);