Whamcloud - gitweb
libext2fs: further clean up and rename check_block_uninit
authorTheodore Ts'o <tytso@mit.edu>
Sun, 19 Jan 2014 06:24:30 +0000 (01:24 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 Jan 2014 06:00:05 +0000 (01:00 -0500)
commitdd9aa132bfc6618a2533007c4ccdf8818927ab35
treea56b7f08a0b27141fccce5650687df8427414ac0
parent3203cd93323e4c1af89f136011854f3eb6ea517d
libext2fs: further clean up and rename check_block_uninit

Commit 8e44eb64bb (libext2fs: mark group data blocks when loading
block bitmap) simplified check_block_uninit since we are now
initializing the bitmap when it is loaded from disk.  It left some
variables which were being set but never used, however.  In addition,
since we only need check_block_uninit() to clear the block bitmap's
uninit flag, rename it to clear_block_uninit(), and only call it once
we have found a free block in ext2fs_new_blocks2().

This cleans up the code some and optimizes things if we need to search
multiple block groups trying to find a free block.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
lib/ext2fs/alloc.c