Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322365
b: refs/heads/master
c: 22cd2e7
h: refs/heads/master
i:
  322363: 3595d79
v: v3
  • Loading branch information
Arne Jansen authored and Chris Mason committed Aug 28, 2012
1 parent 03eb45d commit 4366de2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b12a3b1ea209d9dec02731fba58c3dbe7d31cfd8
refs/heads/master: 22cd2e7de7b0bd68fb668d23e1564707ca689510
17 changes: 17 additions & 0 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2318,6 +2318,23 @@ static noinline int run_clustered_refs(struct btrfs_trans_handle *trans,
ref->in_tree = 0;
rb_erase(&ref->rb_node, &delayed_refs->root);
delayed_refs->num_entries--;
if (locked_ref) {
/*
* when we play the delayed ref, also correct the
* ref_mod on head
*/
switch (ref->action) {
case BTRFS_ADD_DELAYED_REF:
case BTRFS_ADD_DELAYED_EXTENT:
locked_ref->node.ref_mod -= ref->ref_mod;
break;
case BTRFS_DROP_DELAYED_REF:
locked_ref->node.ref_mod += ref->ref_mod;
break;
default:
WARN_ON(1);
}
}
spin_unlock(&delayed_refs->lock);

ret = run_one_delayed_ref(trans, root, ref, extent_op,
Expand Down

0 comments on commit 4366de2

Please sign in to comment.