diff options
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index a3316f1707e6..49bc5a41c1f8 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c | |||
@@ -574,8 +574,8 @@ static int __add_delayed_refs(struct btrfs_delayed_ref_head *head, u64 seq, | |||
574 | struct list_head *prefs, u64 *total_refs, | 574 | struct list_head *prefs, u64 *total_refs, |
575 | u64 inum) | 575 | u64 inum) |
576 | { | 576 | { |
577 | struct btrfs_delayed_ref_node *node; | ||
577 | struct btrfs_delayed_extent_op *extent_op = head->extent_op; | 578 | struct btrfs_delayed_extent_op *extent_op = head->extent_op; |
578 | struct rb_node *n = &head->node.rb_node; | ||
579 | struct btrfs_key key; | 579 | struct btrfs_key key; |
580 | struct btrfs_key op_key = {0}; | 580 | struct btrfs_key op_key = {0}; |
581 | int sgn; | 581 | int sgn; |
@@ -585,12 +585,7 @@ static int __add_delayed_refs(struct btrfs_delayed_ref_head *head, u64 seq, | |||
585 | btrfs_disk_key_to_cpu(&op_key, &extent_op->key); | 585 | btrfs_disk_key_to_cpu(&op_key, &extent_op->key); |
586 | 586 | ||
587 | spin_lock(&head->lock); | 587 | spin_lock(&head->lock); |
588 | n = rb_first(&head->ref_root); | 588 | list_for_each_entry(node, &head->ref_list, list) { |
589 | while (n) { | ||
590 | struct btrfs_delayed_ref_node *node; | ||
591 | node = rb_entry(n, struct btrfs_delayed_ref_node, | ||
592 | rb_node); | ||
593 | n = rb_next(n); | ||
594 | if (node->seq > seq) | 589 | if (node->seq > seq) |
595 | continue; | 590 | continue; |
596 | 591 | ||