Index: sys/fs/devfs/devfs.h =================================================================== --- sys/fs/devfs/devfs.h +++ sys/fs/devfs/devfs.h @@ -166,6 +166,7 @@ #define DEVFS_ROOTINO 2 extern unsigned devfs_rule_depth; +extern struct vop_vector devfs_specops; #define VFSTODEVFS(mp) ((struct devfs_mount *)((mp)->mnt_data)) Index: sys/fs/devfs/devfs_vnops.c =================================================================== --- sys/fs/devfs/devfs_vnops.c +++ sys/fs/devfs/devfs_vnops.c @@ -62,8 +62,8 @@ #include #include +struct vop_vector devfs_specops; static struct vop_vector devfs_vnodeops; -static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include Index: sys/kern/vfs_subr.c =================================================================== --- sys/kern/vfs_subr.c +++ sys/kern/vfs_subr.c @@ -96,6 +96,8 @@ #include #endif +#include + static void delmntque(struct vnode *vp); static int flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo, int slpflag, int slptimeo); @@ -2645,6 +2647,7 @@ */ 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);