From 50e3ff573c65b563252d390d21b10b16d406f189 Mon Sep 17 00:00:00 2001 From: Wang Sheng-Hui Date: Thu, 16 Aug 2012 22:25:20 +0800 Subject: [PATCH] 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 --- root-tree.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/root-tree.c b/root-tree.c index ecb75997..c10d0684 100644 --- a/root-tree.c +++ b/root-tree.c @@ -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); if (ret < 0) 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); leaf = path->nodes[0]; ri = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_item);