From: Andreas Dilger Date: Mon, 31 Mar 2008 14:57:38 +0000 (-0400) Subject: libext2fs: Micro-optimization in inode scan code X-Git-Tag: v1.41-WIP-0427~39 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6f19f44a4c180079b402070efa6733da02eaac3e;p=tools%2Fe2fsprogs.git libext2fs: Micro-optimization in inode scan code Signed-off-by: Andreas Dilger Signed-off-by: "Theodore Ts'o" --- 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; }