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
This commit is contained in:
parent
6eb2d83e44
commit
30a058027a
@ -2633,8 +2633,9 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo,
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user