diff options
-rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 1 | ||||
-rw-r--r-- | sys/sys/vnode.h | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 570f710..ef4e3e6 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -63,7 +63,6 @@ #include <sys/vnode.h> static struct vop_vector devfs_vnodeops; -static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include <fs/devfs/devfs.h> @@ -1760,7 +1759,7 @@ static struct vop_vector devfs_vnodeops = { .vop_vptocnp = devfs_vptocnp, }; -static struct vop_vector devfs_specops = { +struct vop_vector devfs_specops = { .vop_default = &default_vnodeops, .vop_access = devfs_access, diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index cfa8f45..fda80c9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2645,6 +2645,7 @@ loop: */ if (vp->v_usecount == 0 || (flags & FORCECLOSE)) { VNASSERT(vp->v_usecount == 0 || + vp->v_op != &devfs_specops || (vp->v_type != VCHR && vp->v_type != VBLK), vp, ("device VNODE %p is FORCECLOSED", vp)); vgonel(vp); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 8a14f69..e1f912e 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -822,6 +822,7 @@ void vnode_destroy_vobject(struct vnode *vp); extern struct vop_vector fifo_specops; extern struct vop_vector dead_vnodeops; extern struct vop_vector default_vnodeops; +extern struct vop_vector devfs_specops; #define VOP_PANIC ((void*)(uintptr_t)vop_panic) #define VOP_NULL ((void*)(uintptr_t)vop_null) |