From patchwork Tue Jun 13 20:56:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timofey Titovets X-Patchwork-Id: 9784651 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 7DE1C602C9 for ; Tue, 13 Jun 2017 20:56:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 715C2283AD for ; Tue, 13 Jun 2017 20:56:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6658D285B1; Tue, 13 Jun 2017 20:56:28 +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 E5701283AD for ; Tue, 13 Jun 2017 20:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226AbdFMU4Z (ORCPT ); Tue, 13 Jun 2017 16:56:25 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36421 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752109AbdFMU4X (ORCPT ); Tue, 13 Jun 2017 16:56:23 -0400 Received: by mail-wr0-f194.google.com with SMTP id 77so3397856wrb.3 for ; Tue, 13 Jun 2017 13:56:22 -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=YQu7KMzFAo/eJYph4o5LtWVRxf+cbyy4ynlSYs136yo=; b=EfzdjiyHzBps28VKi81JRNwViZu8eSFabgbjsiQGvhnqM8JbvobU+ShUqvLbhZClhz 5AAC0ibOj2Fp7kqbSwaVDhHe2UWCliqOIwYIueNYocGM7f6l3ZUpjQhyd1nPdAI+brpw l7YLDLhR3tclZU+DEBvC/MzIVZOMXUKXBxgIobRL/4AZyeMxjNPxAv6EQ8xsvtZRRIht AoP0uD4z5+OElArp8jgnlyvrsIzMItdg8hY5CS9A+SPo6Wnmb32jTKrWwEg4HmaarIlC cH6KX992Yku/ItXYu25OsqH5I6TRC2m9YateSJIwq3+mVJPx9AhTIu7GjBrVlUAjHz9P PmRQ== 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=YQu7KMzFAo/eJYph4o5LtWVRxf+cbyy4ynlSYs136yo=; b=NEZ9o23c+8NV/ICF3GYo4uxf7Lp+aX0sz7KBWlOHsufyVngtbXrKRvmjVQGD0wuPal yb5/GnDXx0wFphy3tKa+/9Vfk8Z2PiLf0nYPgHAe/yhK7wWMZk6Muq098sF3C0TRNUQW O/BkE0zuiq/dvqDSw3pKH+L9vVvugeeF7CjhT031M6HU1on+VmPR4fhNRhZumBBvqTE9 v0Jb89SaonQCP0sHmKaFalmzUQoW2tEaAF+fMYKceIOb39MhMHc1LBLvGdnwhNtjsBDJ qYptMBrc9vL1ULsLAQr/YIxRbG4xrSdiSnkFUdwOAvVkncDwN1DcmORySTiTrq/ODdwn 3K6w== X-Gm-Message-State: AKS2vOzcj4ly+gO3j39E4docfDsyBNUn9cBy88DS7Y4A4AAzozm9VSrW X5DdxsEsO8Cf7f6F X-Received: by 10.223.160.248 with SMTP id n53mr4640806wrn.108.1497387381578; Tue, 13 Jun 2017 13:56:21 -0700 (PDT) Received: from localhost.localdomain ([91.215.176.151]) by smtp.gmail.com with ESMTPSA id o4sm1922431wrb.27.2017.06.13.13.56.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 13:56:21 -0700 (PDT) From: Timofey Titovets To: linux-btrfs@vger.kernel.org Cc: Timofey Titovets Subject: [PATCH v2 1/2] Btrfs: ref_tree_add remove useless compare Date: Tue, 13 Jun 2017 23:56:07 +0300 Message-Id: <20170613205608.28483-2-nefelim4ag@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170613205608.28483-1-nefelim4ag@gmail.com> References: <20170613205608.28483-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 Remove useless compare to make it more readable Signed-off-by: Timofey Titovets --- fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.13.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 24865da63..0005b8851 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -290,7 +290,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)