Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clport.c
Show First 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | nfscl_nget(struct mount *mntp, struct vnode *dvp, struct nfsfh *nfhp, | ||||
error = getnewvnode(nfs_vnode_tag, mntp, &newnfs_vnodeops, &nvp); | error = getnewvnode(nfs_vnode_tag, mntp, &newnfs_vnodeops, &nvp); | ||||
if (error) { | if (error) { | ||||
uma_zfree(newnfsnode_zone, np); | uma_zfree(newnfsnode_zone, np); | ||||
free(nfhp, M_NFSFH); | free(nfhp, M_NFSFH); | ||||
return (error); | return (error); | ||||
} | } | ||||
vp = nvp; | vp = nvp; | ||||
KASSERT(vp->v_bufobj.bo_bsize != 0, ("nfscl_nget: bo_bsize == 0")); | KASSERT(vp2bo(vp)->bo_bsize != 0, ("nfscl_nget: bo_bsize == 0")); | ||||
vp->v_bufobj.bo_ops = &buf_ops_newnfs; | vp2bo(vp)->bo_ops = &buf_ops_newnfs; | ||||
vp->v_data = np; | vp->v_data = np; | ||||
np->n_vnode = vp; | np->n_vnode = vp; | ||||
/* | /* | ||||
* Initialize the mutex even if the vnode is going to be a loser. | * Initialize the mutex even if the vnode is going to be a loser. | ||||
* This simplifies the logic in reclaim, which can then unconditionally | * This simplifies the logic in reclaim, which can then unconditionally | ||||
* destroy the mutex (in the case of the loser, or if hash_insert | * destroy the mutex (in the case of the loser, or if hash_insert | ||||
* happened to return an error no special casing is needed). | * happened to return an error no special casing is needed). | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,188 Lines • Show Last 20 Lines |