From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:35329 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752746AbcA1U0D (ORCPT ); Thu, 28 Jan 2016 15:26:03 -0500 Date: Thu, 28 Jan 2016 15:25:57 -0500 From: Dave Jones To: Chris Mason CC: Josef Bacik , David Sterba , Subject: btrfs: remove open-coded swap() in backref.c:__merge_refs Message-ID: <20160128202556.GA31503@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-btrfs-owner@vger.kernel.org List-ID: The kernel provides a swap() that does the same thing as this code. Signed-off-by: Dave Jones diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index b90cd3776f8e..626bf6c12992 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -566,17 +566,14 @@ static void __merge_refs(struct list_head *head, int mode) struct __prelim_ref *pos2 = pos1, *tmp; list_for_each_entry_safe_continue(pos2, tmp, head, list) { - struct __prelim_ref *xchg, *ref1 = pos1, *ref2 = pos2; + struct __prelim_ref *ref1 = pos1, *ref2 = pos2; struct extent_inode_elem *eie; if (!ref_for_same_block(ref1, ref2)) continue; if (mode == 1) { - if (!ref1->parent && ref2->parent) { - xchg = ref1; - ref1 = ref2; - ref2 = xchg; - } + if (!ref1->parent && ref2->parent) + swap(ref1, ref1); } else { if (ref1->parent != ref2->parent) continue;