Commit e3f3ad12 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

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: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e4ff5fb5
...@@ -1308,8 +1308,6 @@ static int __must_check __add_reloc_root(struct btrfs_root *root) ...@@ -1308,8 +1308,6 @@ static int __must_check __add_reloc_root(struct btrfs_root *root)
btrfs_panic(fs_info, -EEXIST, btrfs_panic(fs_info, -EEXIST,
"Duplicate root found for start=%llu while inserting into relocation tree", "Duplicate root found for start=%llu while inserting into relocation tree",
node->bytenr); node->bytenr);
kfree(node);
return -EEXIST;
} }
list_add_tail(&root->root_list, &rc->reloc_roots); list_add_tail(&root->root_list, &rc->reloc_roots);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment