Skip to content

Commit

Permalink
Btrfs: drop WARN_ON from btrfs_add_leaf_ref
Browse files Browse the repository at this point in the history
btrfs_add_leaf_ref was doing checks on the objects it found in the
rbtree to make sure they were properly linked into the tree.  But, the field
it was checking can be safely changed outside of the tree spin lock.

The WARN_ON was for debugging the initial implementation and can be
safely removed.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 29, 2008
1 parent 8c8bee1 commit 9a5e1ea
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/btrfs/ref-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ static struct rb_node *tree_insert(struct rb_root *root, u64 bytenr,
while(*p) {
parent = *p;
entry = rb_entry(parent, struct btrfs_leaf_ref, rb_node);
WARN_ON(!entry->in_tree);

if (bytenr < entry->bytenr)
p = &(*p)->rb_left;
Expand Down

0 comments on commit 9a5e1ea

Please sign in to comment.