linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: cleanup for __merge_refs
@ 2012-10-18  7:10 Liu Bo
  2012-10-18  7:31 ` Jan Schmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Liu Bo @ 2012-10-18  7:10 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-18  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18  7:10 [PATCH] Btrfs: cleanup for __merge_refs Liu Bo
2012-10-18  7:31 ` Jan Schmidt
2012-10-18  7:36   ` Liu Bo
2012-10-18  7:42     ` Jan Schmidt
2012-10-18  8:01       ` Liu Bo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).