summaryrefslogtreecommitdiff
path: root/backref.c
diff options
context:
space:
mode:
authorSu Yue <suy.fnst@cn.fujitsu.com>2018-04-24 13:52:32 +0800
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:36 +0200
commitd9b32dd2e9cfd5df62ceb76e939b4a76d1229e94 (patch)
treea72c86e29c16098cede45c9ad04470ac95202acb /backref.c
parent6a42806d74c148b7a46c1ea04c53c03e9b12b472 (diff)
btrfs-progs: remove useless branch in __merge_refs
After call of ref_for_same_block, ref1->parent must equals to ref2->parent, the block of exchange is never reached. So remove the block of exchange. Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'backref.c')
-rw-r--r--backref.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/backref.c b/backref.c
index c144dbf0..51553c70 100644
--- a/backref.c
+++ b/backref.c
@@ -497,7 +497,6 @@ static void __merge_refs(struct pref_state *prefstate, int mode)
for (pos2 = pos1->next, n2 = pos2->next; pos2 != head;
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);
@@ -505,11 +504,6 @@ static void __merge_refs(struct pref_state *prefstate, int mode)
if (mode == 1) {
if (!ref_for_same_block(ref1, ref2))
continue;
- if (!ref1->parent && ref2->parent) {
- xchg = ref1;
- ref1 = ref2;
- ref2 = xchg;
- }
} else {
if (ref1->parent != ref2->parent)
continue;