diff mbox

Btrfs: cleanup for __merge_refs

Message ID 1350544242-2271-1-git-send-email-bo.li.liu@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liu Bo Oct. 18, 2012, 7:10 a.m. UTC
Parents must be same after going through ref_for_same_block.

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

Patch

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;
 }