lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 6 Jan 2010 22:11:54 +0800
From:	liu weni <qingshenlwy@...il.com>
To:	linux-btrfs@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	zheng.yan@...cle.com, chris.mason@...cle.com,
	Xiao Guangrong <xiaoguangrong@...fujitsu.com>,
	strongzgy <strongzgy@...il.com>, Liu Hui <onlyflyer@...il.com>
Subject: [PATCH]btrfs: Remove a extra condition

This patch remove a extra condition.
In this place, the outer is if (!cur || !uptodate)
and then, there are 2 ways: !cur or ! uptodate.
The "else if (!uptodate)" is not necessary.
I think "else" is better.

---
Signed-off-by: Liuwenyi <qingshenlwy@...il.com>

---
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index c4bc570..654f702 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -679,7 +679,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
 			if (!cur) {
 				cur = read_tree_block(root, blocknr,
 							 blocksize, gen);
-			} else if (!uptodate) {
+			} else {
 				btrfs_read_buffer(cur, gen);
 			}
 		}
---

Best Regards,
Liuwenyi
20100107
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ