Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360431
b: refs/heads/master
c: eb12db6
h: refs/heads/master
i:
  360429: 1c5252c
  360427: 033f768
  360423: 3353413
  360415: 214ebbc
v: v3
  • Loading branch information
Josef Bacik committed Feb 20, 2013
1 parent e7c3a6e commit 649fa5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 063d006fa06fbf73fab370921120380333a33e85
refs/heads/master: eb12db690c7eb0f6593ba5792f5861409e88bc03
8 changes: 5 additions & 3 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3615,11 +3615,11 @@ int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
}

while ((node = rb_first(&delayed_refs->root)) != NULL) {
ref = rb_entry(node, struct btrfs_delayed_ref_node, rb_node);
struct btrfs_delayed_ref_head *head = NULL;

ref = rb_entry(node, struct btrfs_delayed_ref_node, rb_node);
atomic_set(&ref->refs, 1);
if (btrfs_delayed_ref_is_head(ref)) {
struct btrfs_delayed_ref_head *head;

head = btrfs_delayed_node_to_head(ref);
if (!mutex_trylock(&head->mutex)) {
Expand All @@ -3641,10 +3641,12 @@ int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
delayed_refs->num_heads_ready--;
list_del_init(&head->cluster);
}

ref->in_tree = 0;
rb_erase(&ref->rb_node, &delayed_refs->root);
delayed_refs->num_entries--;

if (head)
mutex_unlock(&head->mutex);
spin_unlock(&delayed_refs->lock);
btrfs_put_delayed_ref(ref);

Expand Down

0 comments on commit 649fa5c

Please sign in to comment.