From patchwork Wed Jun 7 00:58:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timofey Titovets X-Patchwork-Id: 9770397 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 15D3560353 for ; Wed, 7 Jun 2017 01:00:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7B6728528 for ; Wed, 7 Jun 2017 01:00:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC73C28550; Wed, 7 Jun 2017 01:00:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 969B828528 for ; Wed, 7 Jun 2017 01:00:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbdFGBAS (ORCPT ); Tue, 6 Jun 2017 21:00:18 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33310 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751481AbdFGBAH (ORCPT ); Tue, 6 Jun 2017 21:00:07 -0400 Received: by mail-wr0-f193.google.com with SMTP id v104so11594188wrb.0 for ; Tue, 06 Jun 2017 18:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=onmhImKtkT2umXWPVBDcohC/RTFtIHeN2feXZ+skRK4=; b=EsP44/7isPfiPAs37wvMG64YR5XL1vkx4eSh9sQk/GB5AwmZkrJpcxo+u67zc+lcUc Z9nzrz4WwmV/Ohfcw148CejgWhn/wvTXnGM86s8l8MhR8Dx+9dDwSpme4DkaeoJRHZu5 rCq/RbGISwJ/FI/G7KOkwzXdvt526cIcB55Su5c9d7lKLAFFUL3vS13YsOQ4mq1zn8RA OCtDjNxsQorNAqSxNpV93iJNgBijwh3fykTpEyF/nAAqw2X9oZ5vO5A4rIeKI1rgHvpe 1X5n9ASeSTjvdWbIYYzkzCBC8P9FqA1z7/boLRMg/Bd/tipQgppzE1VbFrflOaPSsxMB diXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=onmhImKtkT2umXWPVBDcohC/RTFtIHeN2feXZ+skRK4=; b=PQYFOUf2iIoXeWVTaRdCpLljwRzd4A8e8lkfURsewDyQHKtGai/EyG2V1wDl52phMv AYVV2GjaHGfJP6fnt1OhniPKZch9VUYm4dZpWjqA+rdtOYPbS105nc+//jA9c4Nt0tI8 Lxqr6mj1VhzAopFSmMY/cIO6SIV3jKleqtXz74U5yIS31TDGScjDG8r6zgyUwQM/gYDB zLjVjSRaneV/US12ZMjidamTt5/XSmyNy3coEbs9wI1YAK2AEVo3z94COCClLV2zzVJH eQIXkiqv1c2Ly+PPdGEmkb9gRsQzpUb/TLKTvbw3N8Bcm4qeUuDSgxG3+5oqMCF+Uzz4 I5Cg== X-Gm-Message-State: AODbwcBN30IkHxw5QfjobYHPLE2vluzt7P0NgysyroT8NzZss89C/Gye E/Vt+w7XvXh89CQg X-Received: by 10.223.153.244 with SMTP id y107mr20087189wrb.96.1496797206287; Tue, 06 Jun 2017 18:00:06 -0700 (PDT) Received: from localhost.localdomain ([91.215.176.151]) by smtp.gmail.com with ESMTPSA id q16sm338101wmg.2.2017.06.06.18.00.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 18:00:05 -0700 (PDT) From: Timofey Titovets To: linux-btrfs@vger.kernel.org Cc: Timofey Titovets Subject: [PATCH 5/7] Btrfs: add_all_parents skip compare Date: Wed, 7 Jun 2017 03:58:42 +0300 Message-Id: <20170607005844.2078-6-nefelim4ag@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170607005844.2078-1-nefelim4ag@gmail.com> References: <20170607005844.2078-1-nefelim4ag@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP By comparison logic if ret => 0 -> ret=0; So lets cleanup compare logic Signed-off-by: Timofey Titovets --- fs/btrfs/backref.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 897d664a9..f53045891 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -592,10 +592,10 @@ static int add_all_parents(struct btrfs_root *root, struct btrfs_path *path, ret = btrfs_next_old_item(root, path, time_seq); } - if (ret > 0) - ret = 0; - else if (ret < 0) + if (ret < 0) free_inode_elem_list(eie); + else + ret = 0; return ret; }