unused code in msdosfs_lookup.c ?

Kostik Belousov kostikbel at gmail.com
Mon Jan 22 15:39:55 UTC 2007


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), but the
> following commands could not trigger the code:
> 
> % ls .
> % ls ..
> % file .
> % file ../.
> % hd .
> % hd ..
> % cd ..
> % cd ../a/b
> % ls -laoT .
> % du /mountpoint
> 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20070122/ef0b707b/attachment.pgp


More information about the freebsd-fs mailing list