summaryrefslogtreecommitdiffstats
path: root/sys/geom
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/geom
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/geom')
-rw-r--r--sys/geom/geom_ccd.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index 75ee082..fcca237 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -1603,18 +1603,7 @@ ccdlookup(path, p, vpp)
return (EBUSY);
}
- if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p)) != 0) {
-#ifdef DEBUG
- if (ccddebug & CCDB_FOLLOW|CCDB_INIT)
- printf("ccdlookup: getattr error = %d\n", error);
-#endif
- VOP_UNLOCK(vp, 0, p);
- (void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p);
- return (error);
- }
-
- /* XXX: eventually we should handle VREG, too. */
- if (va.va_type != VBLK) {
+ if (!vn_isdisk(vp)) {
VOP_UNLOCK(vp, 0, p);
(void)vn_close(vp, FREAD|FWRITE, p->p_ucred, p);
return (ENOTBLK);
OpenPOWER on IntegriCloud