Whamcloud - gitweb
e2fsck: Fix bug which can cause e2fsck -fD to corrupt non-indexed directories
authorTheodore Ts'o <tytso@mit.edu>
Tue, 23 Feb 2010 04:51:26 +0000 (23:51 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 23 Feb 2010 04:51:26 +0000 (23:51 -0500)
commit53fbfb2bc3490d0ff317666322dd077c08116e0c
tree2a7c7ff9a658494b3bdc0295654e2d05f9f30197
parent9080695a4ec602b1102d836b44b18c2ec692c12e
e2fsck: Fix bug which can cause e2fsck -fD to corrupt non-indexed directories

E2fsprogs 1.41.10 introduced a regression (in commit b71e018) where
e2fsck -fD can corrupt non-indexed directories when are exists one or
more file names which alphabetically sort before ".".  This can happen
with ext2 filesystems or for small directories (take less than a
block) which contain filenames that begin with a space or some other
punctuation mark.

Fix this by making sure we never reorder the '.' or '..' entry in the
directory, since they must be first.

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