--- src/sys/vfs/isofs/cd9660/cd9660_vfsops.c 2004/10/12 19:20:58 1.22 +++ src/sys/vfs/isofs/cd9660/cd9660_vfsops.c 2004/11/12 00:09:34 1.23 @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include @@ -155,7 +155,7 @@ iso_mountroot(struct mount *mp, struct t args.flags = ISOFSMNT_ROOT; vn_lock(rootvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(rootvp, FREAD, FSCRED, td); + error = VOP_OPEN(rootvp, FREAD, FSCRED, NULL, td); VOP_UNLOCK(rootvp, 0, td); if (error) return (error); @@ -188,7 +188,7 @@ cd9660_mount(struct mount *mp, char *pat int error; mode_t accessmode; struct iso_mnt *imp = 0; - struct nameidata nd; + struct nlookupdata nd; if ((mp->mnt_flag & MNT_ROOTFS) != 0) { return (iso_mountroot(mp, td)); @@ -214,11 +214,15 @@ cd9660_mount(struct mount *mp, char *pat * 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); - if ((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); - NDFREE(&nd, NDF_ONLY_PNBUF); - devvp = nd.ni_vp; if (!vn_isdisk(devvp, &error)) { vrele(devvp); @@ -302,7 +306,7 @@ iso_mountfs(struct vnode *devvp, struct return (error); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_OPEN(devvp, FREAD, FSCRED, td); + error = VOP_OPEN(devvp, FREAD, FSCRED, NULL, td); VOP_UNLOCK(devvp, 0, td); if (error) return error;