Index: vfs_mount.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_mount.c,v
retrieving revision 1.6
diff -u -u -r1.6 vfs_mount.c
--- vfs_mount.c	12 Jun 2011 03:35:56 -0000	1.6
+++ vfs_mount.c	1 Sep 2011 08:56:55 -0000
@@ -1268,7 +1278,7 @@
 	mutex_enter(&device_lock);
 	for (vq = specfs_hash[SPECHASH(vp->v_rdev)]; vq != NULL;
 	    vq = vq->v_specnext) {
-		if (vq->v_rdev != vp->v_rdev || vq->v_type != vp->v_type)
+		if (vq->v_type != vp->type || vq->v_rdev != vp->v_rdev)
 			continue;
 		if (vq->v_specmountpoint != NULL) {
 			error = EBUSY;
@@ -1295,7 +1305,6 @@
 	int d_type;
 
 	bvp = NULL;
-	dev = vp->v_rdev;
 	d_type = D_OTHER;
 
 	if (iskmemvp(vp))
@@ -1305,6 +1314,7 @@
 	case VCHR: {
 		const struct cdevsw *cdev;
 
+		dev = vp->v_rdev;
 		cdev = cdevsw_lookup(dev);
 		if (cdev != NULL) {
 			dev_t blkdev;
@@ -1325,6 +1335,7 @@
 	case VBLK: {
 		const struct bdevsw *bdev;
 
+		dev = vp->v_rdev;
 		bdev = bdevsw_lookup(dev);
 		if (bdev != NULL)
 			d_type = (bdev->d_flag & D_TYPEMASK);
Index: vfs_subr.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_subr.c,v
retrieving revision 1.424
diff -u -u -r1.424 vfs_subr.c
--- vfs_subr.c	11 Jul 2011 08:27:37 -0000	1.424
+++ vfs_subr.c	1 Sep 2011 08:56:55 -0000
@@ -508,7 +508,7 @@
 
 	mutex_enter(&device_lock);
 	for (vp = specfs_hash[SPECHASH(dev)]; vp; vp = vp->v_specnext) {
-		if (dev == vp->v_rdev && type == vp->v_type)
+		if (type == vp->v_type && dev == vp->v_rdev)
 			break;
 	}
 	if (vp == NULL) {
@@ -543,7 +543,7 @@
 		for (vp = *vpp; vp != NULL;) {
 			mutex_enter(vp->v_interlock);
 			if ((vp->v_iflag & VI_CLEAN) != 0 ||
-			    dev != vp->v_rdev || type != vp->v_type) {
+			    type != vp->v_type || dev != vp->v_rdev) {
 				mutex_exit(vp->v_interlock);
 				vp = vp->v_specnext;
 				continue;
Index: vfs_vnode.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_vnode.c,v
retrieving revision 1.9
diff -u -u -r1.9 vfs_vnode.c
--- vfs_vnode.c	12 Jun 2011 03:35:57 -0000	1.9
+++ vfs_vnode.c	1 Sep 2011 08:56:56 -0000
@@ -1131,7 +1131,7 @@
 		/* If clean or being cleaned, then ignore it. */
 		mutex_enter(vq->v_interlock);
 		if ((vq->v_iflag & (VI_CLEAN | VI_XLOCK)) != 0 ||
-		    vq->v_rdev != dev || vq->v_type != type) {
+		    vq->v_type != type || vq->v_rdev != dev) {
 			mutex_exit(vq->v_interlock);
 			vq = vq->v_specnext;
 			continue;
Index: vfs_wapbl.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_wapbl.c,v
retrieving revision 1.46
diff -u -u -r1.46 vfs_wapbl.c
--- vfs_wapbl.c	14 Aug 2011 12:37:09 -0000	1.46
+++ vfs_wapbl.c	1 Sep 2011 08:56:57 -0000
@@ -337,6 +337,8 @@
 	 * the same as the new log we just opened.
 	 */
 	KDASSERT(!wapbl_replay_isopen(wr));
+	KASSERT(wl->wl_devvp->v_type == VBLK);
+	KASSERT(wr->wr_devvp->v_type == VBLK);
 	KASSERT(wl->wl_devvp->v_rdev == wr->wr_devvp->v_rdev);
 	KASSERT(wl->wl_logpbn == wr->wr_logpbn);
 	KASSERT(wl->wl_circ_size == wr->wr_circ_size);