summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2000-09-05 21:09:56 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2000-09-05 21:09:56 +0000
commit64dc16df4a27f47e514f2e81fedd48c0af446710 (patch)
tree7a58046fb842b2a74767e43e895a2804634dfb82 /sys
parentbfb752885a27ce71ae2558b96e039fbbb6d9de8d (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_export.c8
-rw-r--r--sys/kern/vfs_subr.c8
-rw-r--r--sys/sys/vnode.h3
3 files changed, 12 insertions, 7 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 8b11cc3eca79..16a47855e833 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -438,7 +438,6 @@ vattr_null(vap)
/*
* Routines having to do with the management of the vnode table.
*/
-extern vop_t **dead_vnodeop_p;
/*
* Return the next vnode from the free list.
@@ -2926,6 +2925,8 @@ vn_isdisk(vp, errp)
struct vnode *vp;
int *errp;
{
+ struct cdevsw *cdevsw;
+
if (vp->v_type != VBLK && vp->v_type != VCHR) {
if (errp != NULL)
*errp = ENOTBLK;
@@ -2936,12 +2937,13 @@ vn_isdisk(vp, errp)
*errp = ENXIO;
return (0);
}
- if (!devsw(vp->v_rdev)) {
+ cdevsw = devsw(vp->v_rdev);
+ if (cdevsw == NULL) {
if (errp != NULL)
*errp = ENXIO;
return (0);
}
- if (!(devsw(vp->v_rdev)->d_flags & D_DISK)) {
+ if (!(cdevsw->d_flags & D_DISK)) {
if (errp != NULL)
*errp = ENOTBLK;
return (0);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 8b11cc3eca79..16a47855e833 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -438,7 +438,6 @@ vattr_null(vap)
/*
* Routines having to do with the management of the vnode table.
*/
-extern vop_t **dead_vnodeop_p;
/*
* Return the next vnode from the free list.
@@ -2926,6 +2925,8 @@ vn_isdisk(vp, errp)
struct vnode *vp;
int *errp;
{
+ struct cdevsw *cdevsw;
+
if (vp->v_type != VBLK && vp->v_type != VCHR) {
if (errp != NULL)
*errp = ENOTBLK;
@@ -2936,12 +2937,13 @@ vn_isdisk(vp, errp)
*errp = ENXIO;
return (0);
}
- if (!devsw(vp->v_rdev)) {
+ cdevsw = devsw(vp->v_rdev);
+ if (cdevsw == NULL) {
if (errp != NULL)
*errp = ENXIO;
return (0);
}
- if (!(devsw(vp->v_rdev)->d_flags & D_DISK)) {
+ if (!(cdevsw->d_flags & D_DISK)) {
if (errp != NULL)
*errp = ENOTBLK;
return (0);
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index de8c03876a66..08de77861806 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -636,8 +636,9 @@ void vrele __P((struct vnode *vp));
void vref __P((struct vnode *vp));
void vbusy __P((struct vnode *vp));
-extern vop_t **default_vnodeop_p;
+extern vop_t **default_vnodeop_p;
extern vop_t **spec_vnodeop_p;
+extern vop_t **dead_vnodeop_p;
#endif /* _KERNEL */