]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: ext2fs_new_block2() should call alloc_block hook
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 29 Mar 2015 03:58:20 +0000 (23:58 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 29 Mar 2015 03:58:20 +0000 (23:58 -0400)
commitfae2467fb63b93a9bc8fa354b98daf3a0c87005a
tree298918cc19c325fa9bfbb71d5d442815a2fc1792
parent3d28f54589909de7abe477c2ca9d2ff7b0f2404d
libext2fs: ext2fs_new_block2() should call alloc_block hook

If ext2fs_new_block2() is called without a specific block map, we
should call the alloc_block hook before checking fs->block_map.  This
helps us to avoid a bug in e2fsck where we need to allocate a block
but instead of consulting block_found_map, we use the FS bitmaps,
which (prior to pass 5) could be wrong.

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