Browse Source

btrfs: reada, remove pointless BUG_ON in reada_find_extent

The lock is held, we make the same lookup that previously failed with
EEXIST and we don't insert NULL pointers.

Signed-off-by: David Sterba <dsterba@suse.com>
David Sterba 8 years ago
parent
commit
8694bb6136
1 changed files with 0 additions and 1 deletions
  1. 0 1
      fs/btrfs/reada.c

+ 0 - 1
fs/btrfs/reada.c

@@ -393,7 +393,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
 	ret = radix_tree_insert(&fs_info->reada_tree, index, re);
 	ret = radix_tree_insert(&fs_info->reada_tree, index, re);
 	if (ret == -EEXIST) {
 	if (ret == -EEXIST) {
 		re_exist = radix_tree_lookup(&fs_info->reada_tree, index);
 		re_exist = radix_tree_lookup(&fs_info->reada_tree, index);
-		BUG_ON(!re_exist);
 		re_exist->refcnt++;
 		re_exist->refcnt++;
 		spin_unlock(&fs_info->reada_lock);
 		spin_unlock(&fs_info->reada_lock);
 		btrfs_dev_replace_unlock(&fs_info->dev_replace, 0);
 		btrfs_dev_replace_unlock(&fs_info->dev_replace, 0);