if (flags & LK_NOWAIT) { simple_unlock(&vp->v_interlock); return (EBUSY); }
vget(vp, flags, p)	struct vnode *vp;	int flags;	struct proc *p;{	int error;	int s;	/*	 * If the vnode is in the process of being cleaned out for	 * another use, we wait for the cleaning to finish and then	 * return failure. Cleaning is determined by checking that	 * the VXLOCK flag is set.	 */	if ((flags & LK_INTERLOCK) == 0) {		simple_lock(&vp->v_interlock);		flags |= LK_INTERLOCK;	}	if (vp->v_flag & VXLOCK) {		if (flags & LK_NOWAIT) {			simple_unlock(&vp->v_interlock);			return (EBUSY);		} 		vp->v_flag |= VXWANT;		simple_unlock(&vp->v_interlock);		tsleep((caddr_t)vp, PINOD, "vget", 0);		return (ENOENT); 	}	if (vp->v_usecount == 0 &&	    (vp->v_bioflag & VBIOONFREELIST)) {		s = splbio();		simple_lock(&vnode_free_list_slock);		if (vp->v_holdcnt > 0)			TAILQ_REMOVE(&vnode_hold_list, vp, v_freelist);		else			TAILQ_REMOVE(&vnode_free_list, vp, v_freelist);		simple_unlock(&vnode_free_list_slock);		vp->v_bioflag &= ~VBIOONFREELIST;		splx(s);	} 	vp->v_usecount++;	if (flags & LK_TYPE_MASK) {		if ((error = vn_lock(vp, flags, p)) != 0) {			vp->v_usecount--;			if (vp->v_usecount == 0)				vputonfreelist(vp);			simple_unlock(&vp->v_interlock);		}		return (error);	}	simple_unlock(&vp->v_interlock);	return (0);}