kern/142924: Small cleanup for the inode struct in ext2fs (based on UFS)

Pedro F. Giffuni giffunip at
Thu Jan 28 18:22:27 UTC 2010

Include two more simple patches from ufs_lookup.c:

CVS 1.54:
When compacting directories, ufs_direnter() always trusted DIRSIZ()
to supply the number of bytes to be bcopy()'d to move an entry. If
d_ino == 0 however, DIRSIZ() is not guaranteed to return a sensible
length, so ufs_direnter could end up corrupting a directory during

CVS 1.45:
Extend the sanity checks in ufs_lookup to ensure that each directory
entry fits within its DIRBLKSIZ block.

These were meant to fix issues found with dirhash on UFS but ext2fs
still works here with those changes so I think it's good to have
them, JIC we end up bringing over dirhash to ext2fs.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-ext2fs
Type: application/octet-stream
Size: 4225 bytes
Desc: not available
Url :

More information about the freebsd-bugs mailing list