From patchwork Mon May 18 17:24:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 6430851 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3FA10C0432 for ; Mon, 18 May 2015 17:25:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F621205BA for ; Mon, 18 May 2015 17:25:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 93C01205B8 for ; Mon, 18 May 2015 17:25:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932093AbbERRYt (ORCPT ); Mon, 18 May 2015 13:24:49 -0400 Received: from mailrelay116.isp.belgacom.be ([195.238.20.143]:61359 "EHLO mailrelay116.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751073AbbERRYi (ORCPT ); Mon, 18 May 2015 13:24:38 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=Ax9Kd9og7W2htzcJF9odWb+87PP6pPoG1t8Q07ebhfo= c=1 sm=2 a=WlONEsfKWcCJChwBRLQA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CgDgAFIFpV/4FIiNlcgxCBMrJqCwUBgQSYToE2PRABAQEBAQEBgQpBA4QMLyOBGjeIMAHZC4YWiikdhBcFnV+NBYoHI2FmAUIcgVQ8MYJGAQEB Received: from 129.72-136-217.adsl-dyn.isp.belgacom.be (HELO localhost.home.) ([217.136.72.129]) by relay.skynet.be with ESMTP; 18 May 2015 19:24:18 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Subject: [PATCH 1/2 linux-next] btrfs: use swap() in __merge_refs Date: Mon, 18 May 2015 19:24:12 +0200 Message-Id: <1431969853-14700-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.4.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use kernel.h macro definition. Signed-off-by: Fabian Frederick Reviewed-by: David Sterba --- fs/btrfs/backref.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 9de772e..01abe4c 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -530,7 +530,6 @@ static void __merge_refs(struct list_head *head, 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); @@ -538,11 +537,8 @@ static void __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; - } + if (!ref1->parent && ref2->parent) + swap(ref1, ref2); } else { if (ref1->parent != ref2->parent) continue;