Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346671
b: refs/heads/master
c: 3ef5969
h: refs/heads/master
i:
  346669: 977329e
  346667: d52a1f9
  346663: 62b3240
  346655: 49353f9
v: v3
  • Loading branch information
Alexander Block authored and Josef Bacik committed Dec 12, 2012
1 parent 3fa2083 commit ac44d1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: e1f5790e0588bc5b11eb57f95bfde8702049dd0d
refs/heads/master: 3ef5969cd8a42a78ccdbc53f7abb2e6136b2ec65
13 changes: 11 additions & 2 deletions trunk/fs/btrfs/backref.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ static int __merge_refs(struct list_head *head, int mode)
pos2 = n2, n2 = pos2->next) {
struct __prelim_ref *ref2;
struct __prelim_ref *xchg;
struct extent_inode_elem *eie;

ref2 = list_entry(pos2, struct __prelim_ref, list);

Expand All @@ -472,12 +473,20 @@ static int __merge_refs(struct list_head *head, int mode)
ref1 = ref2;
ref2 = xchg;
}
ref1->count += ref2->count;
} else {
if (ref1->parent != ref2->parent)
continue;
ref1->count += ref2->count;
}

eie = ref1->inode_list;
while (eie && eie->next)
eie = eie->next;
if (eie)
eie->next = ref2->inode_list;
else
ref1->inode_list = ref2->inode_list;
ref1->count += ref2->count;

list_del(&ref2->list);
kfree(ref2);
}
Expand Down

0 comments on commit ac44d1c

Please sign in to comment.