diff mbox

[4/7] Btrfs: ref_tree_add remove useless compare

Message ID 20170607005844.2078-5-nefelim4ag@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Timofey Titovets June 7, 2017, 12:58 a.m. UTC
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 <nefelim4ag@gmail.com>
---
 fs/btrfs/backref.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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)