From a3a538f354c23d762c95475d4366144d487836dc Mon Sep 17 00:00:00 2001 From: trasz Date: Sun, 18 Oct 2015 14:41:38 +0000 Subject: MFC r287033: After r286237 it should be fine to call vgone(9) on a busy GEOM vnode; remove KASSERT that would prevent forced devfs unmount from working. Sponsored by: The FreeBSD Foundation --- sys/fs/devfs/devfs_vnops.c | 3 ++- sys/kern/vfs_subr.c | 4 ---- sys/sys/vnode.h | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 7f20389..17a336f 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -64,6 +64,7 @@ #include static struct vop_vector devfs_vnodeops; +static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include @@ -1763,7 +1764,7 @@ static struct vop_vector devfs_vnodeops = { .vop_vptocnp = devfs_vptocnp, }; -struct vop_vector devfs_specops = { +static 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 d777b98..5058080 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2661,10 +2661,6 @@ loop: * If FORCECLOSE is set, forcibly close the vnode. */ 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); } else { busy++; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index db0f60d..e738212 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -822,7 +822,6 @@ 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) -- cgit v1.1