From 6f19f44a4c180079b402070efa6733da02eaac3e Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Mon, 31 Mar 2008 10:57:38 -0400 Subject: [PATCH] libext2fs: Micro-optimization in inode scan code Signed-off-by: Andreas Dilger Signed-off-by: "Theodore Ts'o" --- lib/ext2fs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c index b4a445d..bd568b3 100644 --- a/lib/ext2fs/inode.c +++ b/lib/ext2fs/inode.c @@ -239,9 +239,8 @@ static errcode_t get_next_blockgroup(ext2_inode_scan scan) scan->inodes_left -= fs->group_desc[scan->current_group].bg_itable_unused; scan->blocks_left = - (EXT2_INODES_PER_GROUP(fs->super) - - fs->group_desc[scan->current_group].bg_itable_unused + - fs->blocksize / scan->inode_size - 1) * + (scan->inodes_left + + (fs->blocksize / scan->inode_size - 1)) * scan->inode_size / fs->blocksize; } -- 1.8.3.1