From patchwork Wed Jun 7 00:58:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timofey Titovets X-Patchwork-Id: 9770387 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 1403C603B4 for ; Wed, 7 Jun 2017 01:00:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E902D2853E for ; Wed, 7 Jun 2017 01:00:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC3532853F; Wed, 7 Jun 2017 01:00:18 +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 8FD332853C for ; Wed, 7 Jun 2017 01:00:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbdFGBAJ (ORCPT ); Tue, 6 Jun 2017 21:00:09 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33974 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751437AbdFGBAH (ORCPT ); Tue, 6 Jun 2017 21:00:07 -0400 Received: by mail-wr0-f195.google.com with SMTP id u101so9096111wrc.1 for ; Tue, 06 Jun 2017 18:00:06 -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=1iiMbYG6N9cmFznW+wxLoe2pNVGx9ytQOQpzhI6F9MY=; b=eipORtQ5UXuWqVGJxMYB06sjs0pvcOJgnHrWnrMoRCmEX1wQZO+wAzlFat78EhJji4 sWBWdKLq6wLGBiX9BaoYUCVe+NCnpagFevNGNKrjKLovNMVhgUL4X8sKn6+qlRCOMCmK pmpzXs8HBG5Zxe2pQdfeLgq5HWIZRN9e38H8PgOgMeRJgMb8oov4/dY5C8MJ9lsLbESl oibC9Z/t9uVcleRDf+VsDg/pYhV7006mOj1k169HfeSsRhlel7HkMYlN3zt1ly2mupGf ryowSr2k6NwmUklKyNXLiAmYa22ErJW1YJ6kNWrYzXqhtzRryznibp7k1rotA4mQLsCZ mA/w== 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=1iiMbYG6N9cmFznW+wxLoe2pNVGx9ytQOQpzhI6F9MY=; b=ANtzgaITgDB3yRpjjlJbSYld3+Qsq1QQ+TFD13LeR6CTuKA0L/e37l+cyg0n2EE1d3 E+alP8ueuTCJi+sURbB1nw784FVLDWwjbaMew0W8B8DdWRCWbILYZHGImyG7Igc4CwkW wjZc+V/kxI7StRe+Hd2ewpOw+dj3IfjqXChVbiLc6KyYYjR76VpFssta3VlJCKsV6Oa3 bChntN9WqzHR3OxA0yA50G7stxfZu6hOA/ufQSKTrkfq42bRa2gOhl17IUv9432Yx70t 7dXykBRClbXxZZNOY253Qf0jJWHdzwMIzXNcgicOr3OOzZdj3k93fpfZHiRfq68QxIJz 35Jg== X-Gm-Message-State: AODbwcC77fPoX0BuDUrg7XnHXRcLh1wIPIrbGbTuaCILclO6QU6zF038 hrNJRirTU7v5CHYD X-Received: by 10.223.142.48 with SMTP id n45mr19079944wrb.188.1496797205446; Tue, 06 Jun 2017 18:00:05 -0700 (PDT) Received: from localhost.localdomain ([91.215.176.151]) by smtp.gmail.com with ESMTPSA id q16sm338101wmg.2.2017.06.06.18.00.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 18:00:04 -0700 (PDT) From: Timofey Titovets To: linux-btrfs@vger.kernel.org Cc: Timofey Titovets Subject: [PATCH 4/7] Btrfs: ref_tree_add remove useless compare Date: Wed, 7 Jun 2017 03:58:41 +0300 Message-Id: <20170607005844.2078-5-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 As code already know that (node->ref_mod > 0) else if (node->ref_mod <= 0) - useless So just leave 'else' Signed-off-by: Timofey Titovets --- fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 2e4709e0c..897d664a9 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -294,7 +294,7 @@ static int ref_tree_add(struct ref_root *ref_tree, u64 root_id, u64 object_id, if (node->ref_mod > 0) ref_tree->unique_refs += origin_count > 0 ? 0 : 1; - else if (node->ref_mod <= 0) + else ref_tree->unique_refs += origin_count > 0 ? -1 : 0; if (!node->ref_mod)