summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-11-22 10:33:55 +0000
committerphk <phk@FreeBSD.org>1999-11-22 10:33:55 +0000
commit1848d96439c3eae03af8c379d699cf530ec39611 (patch)
tree0dd64726856780468e173aa94cbba55946f1b4cf /sys/kern/vfs_aio.c
parent9fac48d9a6cd7258b469d97bb694c7e34d7d8e39 (diff)
downloadFreeBSD-src-1848d96439c3eae03af8c379d699cf530ec39611.zip
FreeBSD-src-1848d96439c3eae03af8c379d699cf530ec39611.tar.gz
Convert various pieces of code to use vn_isdisk() rather than checking
for vp->v_type == VBLK. In ccd: we don't need to call VOP_GETATTR to find the type of a vnode. Reviewed by: sos
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 8308caf..fd632a9 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -934,10 +934,7 @@ aio_qphysio(p, aiocbe)
vp = (struct vnode *)fp->f_data;
- /* XXX: use vn_isdisk() when VBLK and VCHR are unified */
- if (vp->v_type != VCHR)
- return (-1);
- if (!(devsw(vp->v_rdev)->d_flags & D_DISK))
+ if (!vn_isdisk(vp))
return (-1);
if (cb->aio_nbytes % vp->v_rdev->si_bsize_phys)
OpenPOWER on IntegriCloud