simple_lock(&vp->v_interlock);
vclean(vp, flags, p)	register struct vnode *vp;	int flags;	struct proc *p;{	int active;	/*	 * Check to see if the vnode is in use.	 * If so we have to reference it before we clean it out	 * so that its count cannot fall to zero and generate a	 * race against ourselves to recycle it.	 */	if ((active = vp->v_usecount) != 0)		vp->v_usecount++;	/*	 * Prevent the vnode from being recycled or	 * brought into use while we clean it out.	 */	if (vp->v_flag & VXLOCK)		panic("vclean: deadlock");	vp->v_flag |= VXLOCK;		/*	 * Even if the count is zero, the VOP_INACTIVE routine may still	 * have the object locked while it cleans it out. The VOP_LOCK	 * ensures that the VOP_INACTIVE routine is done with its work.	 * For active vnodes, it ensures that no other activity can	 * occur while the underlying object is being cleaned out.	 */	VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, p);	/*	 * Clean out any buffers associated with the vnode.	 */	if (flags & DOCLOSE)		vinvalbuf(vp, V_SAVE, NOCRED, p, 0, 0);	/*	 * If purging an active vnode, it must be closed and	 * deactivated before being reclaimed. Note that the	 * VOP_INACTIVE will unlock the vnode	 */	if (active) {		if (flags & DOCLOSE)			VOP_CLOSE(vp, FNONBLOCK, NOCRED, p);		VOP_INACTIVE(vp, p);	} else {		/*		 * Any other processes trying to obtain this lock must first		 * wait for VXLOCK to clear, then call the new lock operation.		 */		VOP_UNLOCK(vp, 0, p);	}	/*	 * Reclaim the vnode.	 */	if (VOP_RECLAIM(vp, p))		panic("vclean: cannot reclaim");	if (active) {		vp->v_usecount--;		if (vp->v_usecount == 0) {			if (vp->v_holdcnt > 0)				panic("vclean: not clean");			vputonfreelist(vp);		}		simple_unlock(&vp->v_interlock);	}	cache_purge(vp);	if (vp->v_vnlock) {		if ((vp->v_vnlock->lk_flags & LK_DRAINED) == 0)			vprint("vclean: lock not drained", vp);		FREE(vp->v_vnlock, M_VNODE);		vp->v_vnlock = NULL;	}	/*	 * Done with purge, notify sleepers of the grim news.	 */	vp->v_op = dead_vnodeop_p;	vp->v_tag = VT_NON;	vp->v_flag &= ~VXLOCK;#ifdef DIAGNOSTIC	vp->v_flag &= ~VLOCKSWORK;#endif	if (vp->v_flag & VXWANT) {		vp->v_flag &= ~VXWANT;		wakeup((caddr_t)vp);	}}