From patchwork Thu Oct 18 07:10:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 1608431 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 498BDDFB34 for ; Thu, 18 Oct 2012 07:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751748Ab2JRHLd (ORCPT ); Thu, 18 Oct 2012 03:11:33 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:46436 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168Ab2JRHLd (ORCPT ); Thu, 18 Oct 2012 03:11:33 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q9I7BVO7020298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Oct 2012 07:11:32 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q9I7BVR4029721 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 18 Oct 2012 07:11:31 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q9I7BUo7021951 for ; Thu, 18 Oct 2012 02:11:30 -0500 Received: from liubo.localdomain (/222.90.237.176) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 18 Oct 2012 00:11:30 -0700 From: Liu Bo To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: cleanup for __merge_refs Date: Thu, 18 Oct 2012 15:10:42 +0800 Message-Id: <1350544242-2271-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 1.7.7.6 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Parents must be same after going through ref_for_same_block. Signed-off-by: Liu Bo --- 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; }