From a77c8e80359e1996d8fce5b59f013994efdd7141 Mon Sep 17 00:00:00 2001 From: des Date: Fri, 12 Mar 2004 12:02:12 +0000 Subject: Replace a manual check of a VMIO candidate with vn_canvmio(). This silences an annoying warning in getblk() when VMIO'ing on a directory vnode, which can happen when vfs.vmiodirenable is 1. Bring the warning message in line with reality at the same time. Submitted by: hmp --- sys/kern/vfs_bio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index d612fc9..3b1f0d2 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2633,8 +2633,9 @@ loop: if (vmio) { bp->b_flags |= B_VMIO; #if defined(VFS_BIO_DEBUG) - if (vp->v_type != VREG) - printf("getblk: vmioing file type %d???\n", vp->v_type); + if (vn_canvmio(vp) != TRUE) + printf("getblk: VMIO on vnode type %d\n", + vp->v_type); #endif VOP_GETVOBJECT(vp, &bp->b_object); } else { -- cgit v1.1