linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] [PATCH] ext4: avoid calculating free inodes twice in find_group_orlov()
@ 2011-11-17  7:20 Zheng Liu
  2011-12-29  0:10 ` Ted Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Zheng Liu @ 2011-11-17  7:20 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, Zheng Liu

ext4_free_inodes_count() shouldn't be called twice in here

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 fs/ext4/ialloc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 00beb4f..1d81bfc 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -477,8 +477,7 @@ fallback_retry:
 	for (i = 0; i < ngroups; i++) {
 		grp = (parent_group + i) % ngroups;
 		desc = ext4_get_group_desc(sb, grp, NULL);
-		if (desc && ext4_free_inodes_count(sb, desc) &&
-		    ext4_free_inodes_count(sb, desc) >= avefreei) {
+		if (desc && ext4_free_inodes_count(sb, desc) >= avefreei) {
 			*group = grp;
 			return 0;
 		}
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-29  0:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17  7:20 [PATCH 2/2] [PATCH] ext4: avoid calculating free inodes twice in find_group_orlov() Zheng Liu
2011-12-29  0:10 ` Ted Ts'o

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).