From: Timofey Titovets <nefelim4ag@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Timofey Titovets <nefelim4ag@gmail.com>
Subject: [PATCH v2 1/2] Btrfs: ref_tree_add remove useless compare
Date: Tue, 13 Jun 2017 23:56:07 +0300 [thread overview]
Message-ID: <20170613205608.28483-2-nefelim4ag@gmail.com> (raw)
In-Reply-To: <20170613205608.28483-1-nefelim4ag@gmail.com>
Remove useless compare to make it more readable
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
---
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 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)
--
2.13.1
next prev parent reply other threads:[~2017-06-13 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 20:56 [PATCH v2 0/2] Btrfs: if else cleanups Timofey Titovets
2017-06-13 20:56 ` Timofey Titovets [this message]
2017-06-13 20:56 ` [PATCH v2 2/2] Btrfs: add_all_parents skip compare Timofey Titovets
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170613205608.28483-2-nefelim4ag@gmail.com \
--to=nefelim4ag@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).