bcopy((caddr_t)argp->fh, (caddr_t)&nmp->nm_fh, sizeof(nfsv2fh_t));
nmp->nm_fhsize = argp->fhsize; bcopy((caddr_t)argp->fh, (caddr_t)nmp->nm_fh, argp->fhsize);
mountnfs(argp, mp, nam, pth, hst, vpp)	register struct nfs_args *argp;	register struct mount *mp;	struct mbuf *nam;	char *pth, *hst;	struct vnode **vpp;{	register struct nfsmount *nmp;	struct nfsnode *np;	int error;	struct vattr attrs;	if (mp->mnt_flag & MNT_UPDATE) {		nmp = VFSTONFS(mp);		/* update paths, file handles, etc, here	XXX */		m_freem(nam);		return (0);	} else {		MALLOC(nmp, struct nfsmount *, sizeof (struct nfsmount),		    M_NFSMNT, M_WAITOK);		bzero((caddr_t)nmp, sizeof (struct nfsmount));		mp->mnt_data = (qaddr_t)nmp;	}	getnewfsid(mp, makefstype(MOUNT_NFS));	nmp->nm_mountp = mp;	if ((argp->flags & (NFSMNT_NQNFS | NFSMNT_MYWRITE)) ==		(NFSMNT_NQNFS | NFSMNT_MYWRITE)) {		error = EPERM;		goto bad;	}	if (argp->flags & NFSMNT_NQNFS)		/*		 * We have to set mnt_maxsymlink to a non-zero value so		 * that COMPAT_43 routines will know that we are setting		 * the d_type field in directories (and can zero it for		 * unsuspecting binaries).		 */		mp->mnt_maxsymlinklen = 1;	nmp->nm_timeo = NFS_TIMEO;	nmp->nm_retry = NFS_RETRANS;	nmp->nm_wsize = NFS_WSIZE;	nmp->nm_rsize = NFS_RSIZE;	nmp->nm_numgrps = NFS_MAXGRPS;	nmp->nm_readahead = NFS_DEFRAHEAD;	nmp->nm_leaseterm = NQ_DEFLEASE;	nmp->nm_deadthresh = NQ_DEADTHRESH;	CIRCLEQ_INIT(&nmp->nm_timerhead);	nmp->nm_inprog = NULLVP;	bcopy((caddr_t)argp->fh, (caddr_t)&nmp->nm_fh, sizeof(nfsv2fh_t));#ifdef COMPAT_09	mp->mnt_stat.f_type = 2;#else	mp->mnt_stat.f_type = 0;#endif	strncpy(&mp->mnt_stat.f_fstypename[0], mp->mnt_op->vfs_name, MFSNAMELEN);	bcopy(hst, mp->mnt_stat.f_mntfromname, MNAMELEN);	bcopy(pth, mp->mnt_stat.f_mntonname, MNAMELEN);	nmp->nm_nam = nam;	nfs_decode_args(nmp, argp);	/* Set up the sockets and per-host congestion */	nmp->nm_sotype = argp->sotype;	nmp->nm_soproto = argp->proto;	/*	 * For Connection based sockets (TCP,...) defer the connect until	 * the first request, in case the server is not responding.	 */	if (nmp->nm_sotype == SOCK_DGRAM &&		(error = nfs_connect(nmp, (struct nfsreq *)0)))		goto bad;	/*	 * This is silly, but it has to be set so that vinifod() works.	 * We do not want to do an nfs_statfs() here since we can get	 * stuck on a dead server and we are holding a lock on the mount	 * point.	 */	mp->mnt_stat.f_iosize = NFS_MAXDGRAMDATA;	/*	 * A reference count is needed on the nfsnode representing the	 * remote root.  If this object is not persistent, then backward	 * traversals of the mount point (i.e. "..") will not work if	 * the nfsnode gets flushed out of the cache. Ufs does not have	 * this problem, because one can identify root inodes by their	 * number == ROOTINO (2).	 */	if ((error = nfs_nget(mp, &nmp->nm_fh, &np)) != 0)		goto bad;	*vpp = NFSTOV(np);	VOP_GETATTR(*vpp, &attrs, curproc->p_ucred, curproc);	return (0);bad:	nfs_disconnect(nmp);	free((caddr_t)nmp, M_NFSMNT);	m_freem(nam);	return (error);}