if (flags & LK_NOWAIT) { simple_unlock(&vp->v_interlock); return (EBUSY); }
vn_lock(vp, flags, p)	struct vnode *vp;	int flags;	struct proc *p;{	int error;		do {		if ((flags & LK_INTERLOCK) == 0)			simple_lock(&vp->v_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, "vn_lock", 0);			error = ENOENT;		} else {			error = VOP_LOCK(vp, flags | LK_INTERLOCK | LK_CANRECURSE, p);			if (error == 0)				return (error);		}		flags &= ~LK_INTERLOCK;	} while (flags & LK_RETRY);	return (error);}