Whamcloud - gitweb
libext2fs: Fix regression in ext2fs_extent_set_bmap()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 20 Jul 2009 02:43:33 +0000 (22:43 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 Jul 2009 02:43:33 +0000 (22:43 -0400)
commit16e470e65010ba3f0516cf9cdf1bd6c98f064e3f
tree977576b09f7895db5d2c0f3a7315b12cb9e0e746
parent95f65c3d70a7a883c3c98d7f53feed970dc64271
libext2fs: Fix regression in ext2fs_extent_set_bmap()

Commit 0dc291611 introduced a regression when unmapping the first
block in an extent.  This caused e2fsck -fD to corrupt large
directories if the directory has to shrink by more than one block.
The problem was set_bmap should only go to a next leaf when setting a
first block in an extent, and not when it is unmapping the first block
in an extent.

Addresses-Debian-Bug: #537510

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/extent.c