--- src/sys/vfs/msdosfs/msdosfs_vfsops.c 2004/10/12 19:21:00 1.20 +++ src/sys/vfs/msdosfs/msdosfs_vfsops.c 2004/11/12 00:09:36 1.21 @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include @@ -235,7 +235,7 @@ msdosfs_mount(struct mount *mp, char *pa int error, flags; mode_t accessmode; struct proc *p = td->td_proc; - struct nameidata nd; + struct nlookupdata nd; KKASSERT(p); @@ -299,12 +299,15 @@ msdosfs_mount(struct mount *mp, char *pa * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(&nd, NAMEI_LOOKUP, CNP_FOLLOW, UIO_USERSPACE, args.fspec, td); - error = namei(&nd); + devvp = NULL; + error = nlookup_init(&nd, args.fspec, UIO_USERSPACE, NLC_FOLLOW); + if (error == 0) + error = nlookup(&nd); + if (error == 0) + error = cache_vref(nd.nl_ncp, nd.nl_cred, &devvp); + nlookup_done(&nd); if (error) return (error); - devvp = nd.ni_vp; - NDFREE(&nd, NDF_ONLY_PNBUF); if (!vn_isdisk(devvp, &error)) { vrele(devvp); @@ -397,7 +400,7 @@ mountmsdosfs(struct vnode *devvp, struct ronly = (mp->mnt_flag & MNT_RDONLY) != 0; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td); + error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, NULL, td); VOP_UNLOCK(devvp, 0, td); if (error) return (error);