if (nvp_rdev != vp->v_rdev || nvp->v_type != vp->v_type)
if (nvp_rdev != vp->v_rdev || nvp->v_type != vp->v_type) { simple_unlock(&vp->v_interlock);
checkalias(nvp, nvp_rdev, mp)	register struct vnode *nvp;	dev_t nvp_rdev;	struct mount *mp;{	struct proc *p = curproc;	register struct vnode *vp;	struct vnode **vpp;	if (nvp->v_type != VBLK && nvp->v_type != VCHR)		return (NULLVP);	vpp = &speclisth[SPECHASH(nvp_rdev)];loop:	simple_lock(&spechash_slock);	for (vp = *vpp; vp; vp = vp->v_specnext) {		simple_lock(&vp->v_interlock);		if (nvp_rdev != vp->v_rdev || nvp->v_type != vp->v_type)			continue;		/*		 * Alias, but not in use, so flush it out.		 */		if (vp->v_usecount == 0) {			simple_unlock(&spechash_slock);			vgonel(vp, p);			goto loop;		}		if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) {			simple_unlock(&spechash_slock);			goto loop;		}		break;	}		/* 	 * Common case is actually in the if statement	 */	if (vp == NULL || !(vp->v_tag == VT_NON && vp->v_type == VBLK)) {		MALLOC(nvp->v_specinfo, struct specinfo *,			sizeof(struct specinfo), M_VNODE, M_WAITOK);		nvp->v_rdev = nvp_rdev;		nvp->v_hashchain = vpp;		nvp->v_specnext = *vpp;		nvp->v_specmountpoint = NULL;		nvp->v_speclockf = NULL;		simple_unlock(&spechash_slock);		*vpp = nvp;		if (vp != NULLVP) {			nvp->v_flag |= VALIASED;			vp->v_flag |= VALIASED;			vput(vp);		}		return (NULLVP);	}	/* 	 * This code is the uncommon case. It is called in case	 * we found an alias that was VT_NON && vtype of VBLK	 * This means we found a block device that was created	 * using bdevvp.	 * An example of such a vnode is the root partition device vnode	 * craeted in ffs_mountroot.	 * 	 * The vnodes created by bdevvp should not be aliased (why?).	 */	simple_unlock(&spechash_slock);	VOP_UNLOCK(vp, 0, p);	simple_lock(&vp->v_interlock);	vclean(vp, 0, p);	vp->v_op = nvp->v_op;	vp->v_tag = nvp->v_tag;	nvp->v_type = VNON;	insmntque(vp, mp);	return (vp);}