FreeBSD/sys/fs/nfsclient/nfs_clstate.c
/*
 * Called to re-open a file. Basically get a vnode for the file handle
 * and then call nfsrpc_openrpc() to do the rest.
 */
Called to re-open a file. Basically get a vnode for the file handle
and then call nfsrpc_openrpc() to do the rest.
Called to re - open a file . Basically get a vnode for the file handle and then call nfsrpc_openrpc () to do the rest .
static int
nfsrpc_reopen(struct nfsmount *nmp, u_int8_t *fhp, int fhlen,
    u_int32_t mode, struct nfsclopen *op, struct nfscldeleg **dpp,
    struct ucred *cred, NFSPROC_T *p)
{
	struct nfsnode *np;
	vnode_t vp;
	int error;
	error = nfscl_ngetreopen(nmp->nm_mountp, fhp, fhlen, p, &np);
	if (error)
		return (error);
	vp = NFSTOV(np);
	if (np->n_v4 != NULL) {
		error = nfscl_tryopen(nmp, vp, np->n_v4->n4_data,
		    np->n_v4->n4_fhlen, fhp, fhlen, mode, op,
		    NFS4NODENAME(np->n_v4), np->n_v4->n4_namelen, dpp, 0, 0,
		    cred, p);
	} else {
		error = EINVAL;
	}
	vrele(vp);
	return (error);
}
static int nfsrpc_reopen ( struct nfsmount * nmp , u_int8_t * fhp , int fhlen , u_int32_t mode , struct nfsclopen * op , struct nfscldeleg * * dpp , struct ucred * cred , NFSPROC_T * p ) { struct nfsnode * np ; vnode_t vp ; int error ; error = nfscl_ngetreopen ( nmp -> nm_mountp , fhp , fhlen , p , & np ) ; if ( error ) return ( error ) ; vp = NFSTOV ( np ) ; if ( np -> n_v4 != NULL ) { error = nfscl_tryopen ( nmp , vp , np -> n_v4 -> n4_data , np -> n_v4 -> n4_fhlen , fhp , fhlen , mode , op , NFS4NODENAME ( np -> n_v4 ) , np -> n_v4 -> n4_namelen , dpp , 0 , 0 , cred , p ) ; } else { error = EINVAL ; } vrele ( vp ) ; return ( error ) ; }
Called to re-open a file.
Called to re - open a file .