unused code in msdosfs_lookup.c ?

Rene Ladan r.c.ladan at gmail.com
Mon Jan 22 16:22:23 UTC 2007

Kostik Belousov schreef:
> On Mon, Jan 22, 2007 at 03:15:55PM +0100, Rene Ladan wrote:
>> Hi,
>> while working on the XTAF fs module (see the archives), I discovered
>> that the code path in the lookup() routine which deals with
>> cnp->cn_nameptr being "." or ".." is never used.
>> To verify this, I added a printf() to the analogous code in
>> sys/fs/msdosfs/msdosfs_lookup.c (lines 134-145, revision 1.47),
>> This code fakes the "." and ".." entries in the root directory of msdos
>> filesystems, which are otherwise absent.
>> So it seems like that code was either never tested or something in the
>> calling code changed (which would be cachedlookup() in VOP layer).
>> Ideas?
> See, for instance, kern/92785.

Good reading, it teached me that that code is for the absolute root
directory, not for the root directory of the msdos filesystem.  That is
one reason why it is never used, because (according to the pr) the vfs
layer already handles this case.

GPG fingerprint = E738 5471 D185 7013 0EE0  4FC8 3C1D 6F83 12E1 84F6

"It won't fit on the line."
		-- me, 2001

More information about the freebsd-fs mailing list