Whamcloud - gitweb
libext2fs: add space for checksum when unconverting a hashed directory block
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 13 Oct 2013 03:14:40 +0000 (23:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 13 Oct 2013 03:16:10 +0000 (23:16 -0400)
commit8a9a7fd3666237fc1f11a7feb947287b167042a5
tree7aa46abce54b6e3f63d4f34fbc06884a7ac8fd3f
parenta2dd2e13c60b3bd9134c4dff267703f0ac3e2a8d
libext2fs: add space for checksum when unconverting a hashed directory block

The ext2fs_link function has the unfortunate habit of converting
hashed directories into unhashed directories.  It doesn't notice that
it's slicing and dicing directory entries from a former dx_{root,node}
block, and therefore doesn't write a protective dirent into the end of
the block to store the checksum.  Teach it to do this.

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