--- src/sys/vfs/nfs/nfs_subs.c 2007/11/02 19:52:28 1.47 +++ src/sys/vfs/nfs/nfs_subs.c 2008/09/17 21:44:24 1.48 @@ -1457,6 +1457,7 @@ nfs_namei(struct nlookupdata *nd, struct char *namebuf; struct nchandle nch; struct vnode *dp; + struct mount *mp; int error, rdonly; namebuf = objcache_get(namei_oc, M_WAITOK); @@ -1502,7 +1503,7 @@ nfs_namei(struct nlookupdata *nd, struct * Extract and set starting directory. The returned dp is refd * but not locked. */ - error = nfsrv_fhtovp(fhp, FALSE, &dp, cred, slp, + error = nfsrv_fhtovp(fhp, FALSE, &mp, &dp, cred, slp, nam, &rdonly, kerbflag, pubflag); if (error) goto out; @@ -1805,7 +1806,8 @@ nfsm_srvfattr(struct nfsrv_descript *nfs * - if not lockflag unlock it with vn_unlock() */ int -nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, +nfsrv_fhtovp(fhandle_t *fhp, int lockflag, + struct mount **mpp, struct vnode **vpp, struct ucred *cred, struct nfssvc_sock *slp, struct sockaddr *nam, int *rdonlyp, int kerbflag, int pubflag) { @@ -1817,7 +1819,8 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla struct sockaddr_int *saddr; #endif - *vpp = (struct vnode *)0; + *vpp = NULL; + *mpp = NULL; if (nfs_ispublicfh(fhp)) { if (!pubflag || !nfs_pub.np_valid) @@ -1825,13 +1828,13 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla fhp = &nfs_pub.np_handle; } - mp = vfs_getvfs(&fhp->fh_fsid); - if (!mp) + mp = *mpp = vfs_getvfs(&fhp->fh_fsid); + if (mp == NULL) return (ESTALE); error = VFS_CHECKEXP(mp, nam, &exflags, &credanon); if (error) return (error); - error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); + error = VFS_FHTOVP(mp, NULL, &fhp->fh_fid, vpp); if (error) return (error); #ifdef MNT_EXNORESPORT