Whamcloud - gitweb
e2fsck: optimize CPU usage in check_{block,inode}_bitmaps()
authorTheodore Ts'o <tytso@mit.edu>
Sun, 11 Mar 2012 18:15:19 +0000 (14:15 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 11 Mar 2012 19:38:23 +0000 (15:38 -0400)
commitd2c9c42a0b1c0776afe47c9bfbddbc170d8aa036
treee48219b64ee58d751737ebb52e730be7b503932a
parentdeae60a087fceb3418efb8dd23ab557b767f925a
e2fsck: optimize CPU usage in check_{block,inode}_bitmaps()

The boolean expression (!skip_group || csum_flag) is always true,
since if csum_flag is FALSE, skip_group must also be FALSE.  Hence, we
can just remove the expression from the conditional altogether, thus
simplifying the code and making it easier to read/understand.

Also, in the case where the bit is set in the bitmap, there's no point
repeatedly setting first_free to be ext2fs_block_count(fs->super).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/pass5.c