btrfs-progs: code cleanup for root-tree.c/btrfs_del_root

Remove the redundant if check on the condition ret > 0.
Leave BUG_ON check here.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
This commit is contained in:
Wang Sheng-Hui 2012-08-16 22:25:20 +08:00 committed by David Sterba
parent 8a46573c2a
commit 50e3ff573c
1 changed files with 0 additions and 8 deletions

View File

@ -181,14 +181,6 @@ int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
ret = btrfs_search_slot(trans, root, key, path, -1, 1); ret = btrfs_search_slot(trans, root, key, path, -1, 1);
if (ret < 0) if (ret < 0)
goto out; goto out;
if (ret) {
btrfs_print_leaf(root, path->nodes[0]);
printk("failed to del %llu %u %llu\n",
(unsigned long long)key->objectid,
key->type,
(unsigned long long)key->offset);
}
BUG_ON(ret != 0); BUG_ON(ret != 0);
leaf = path->nodes[0]; leaf = path->nodes[0];
ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item); ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item);