Parents must be same after going through ref_for_same_block.

Signed-off-by: Liu Bo <bo.li....@oracle.com>
---
 fs/btrfs/backref.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index f318793..9aaa38e6 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -469,11 +469,6 @@ static int __merge_refs(struct list_head *head, int mode)
                        if (mode == 1) {
                                if (!ref_for_same_block(ref1, ref2))
                                        continue;
-                               if (!ref1->parent && ref2->parent) {
-                                       xchg = ref1;
-                                       ref1 = ref2;
-                                       ref2 = xchg;
-                               }
                                ref1->count += ref2->count;
                        } else {
                                if (ref1->parent != ref2->parent)
@@ -483,7 +478,6 @@ static int __merge_refs(struct list_head *head, int mode)
                        list_del(&ref2->list);
                        kfree(ref2);
                }
-
        }
        return 0;
 }
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to