summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-04 08:49:14 +0000
committerphk <phk@FreeBSD.org>2005-01-04 08:49:14 +0000
commitf2581a224ff97d3615d0cfa99b7f2cc70775057d (patch)
treef6a8cc92495f194571ab2acc5de9d4ae87961d86 /sys/kern
parent9799def1bc745b61ab8e5425e0a74c23b19f9afd (diff)
downloadFreeBSD-src-f2581a224ff97d3615d0cfa99b7f2cc70775057d.zip
FreeBSD-src-f2581a224ff97d3615d0cfa99b7f2cc70775057d.tar.gz
Since we do not support forceful unmount of DEVFS we can do away with
the partially implemented vnode-readoption code in vgonechrl().
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_subr.c48
1 files changed, 3 insertions, 45 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index e67d861..ba06507 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -89,7 +89,6 @@ static void syncer_shutdown(void *arg, int howto);
static int vtryrecycle(struct vnode *vp);
static void vx_lock(struct vnode *vp);
static void vx_unlock(struct vnode *vp);
-static void vgonechrl(struct vnode *vp, struct thread *td);
/*
@@ -2125,10 +2124,9 @@ loop:
* all other files, just kill them.
*/
if (flags & FORCECLOSE) {
- if (vp->v_type != VCHR)
- vgonel(vp, td);
- else
- vgonechrl(vp, td);
+ KASSERT(vp->v_type != VCHR && vp->v_type != VBLK,
+ ("device VNODE %p is FORCECLOSED", vp));
+ vgonel(vp, td);
MNT_ILOCK(mp);
continue;
}
@@ -2368,46 +2366,6 @@ vgone(vp)
}
/*
- * Disassociate a character device from the its underlying filesystem and
- * attach it to spec. This is for use when the chr device is still active
- * and the filesystem is going away.
- */
-static void
-vgonechrl(struct vnode *vp, struct thread *td)
-{
- ASSERT_VI_LOCKED(vp, "vgonechrl");
- vx_lock(vp);
- /*
- * This is a custom version of vclean() which does not tearm down
- * the bufs or vm objects held by this vnode. This allows filesystems
- * to continue using devices which were discovered via another
- * filesystem that has been unmounted.
- */
- if (vp->v_usecount != 0) {
- v_incr_usecount(vp, 1);
- /*
- * Ensure that no other activity can occur while the
- * underlying object is being cleaned out.
- */
- VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK, td);
- /*
- * Any other processes trying to obtain this lock must first
- * wait for VXLOCK to clear, then call the new lock operation.
- */
- VOP_UNLOCK(vp, 0, td);
- vp->v_vnlock = &vp->v_lock;
- vp->v_tag = "orphanchr";
- delmntque(vp);
- cache_purge(vp);
- vrele(vp);
- VI_LOCK(vp);
- } else
- vclean(vp, 0, td);
- vx_unlock(vp);
- VI_UNLOCK(vp);
-}
-
-/*
* vgone, with the vp interlock held.
*/
void
OpenPOWER on IntegriCloud