From db442506dbc5ba2af4daa2eebc88157389dab17c Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 13 Nov 2004 23:38:13 +0000 Subject: [PATCH] Eliminate vop_revoke() function now that devfs_revoke() does the entire job. --- sys/kern/vfs_subr.c | 42 ------------------------------------------ sys/sys/vnode.h | 1 - 2 files changed, 43 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 23de658b5368..d32deddf3e41 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2480,48 +2480,6 @@ vclean(vp, flags, td) vp->v_tag = "none"; } -/* - * Eliminate all activity associated with the requested vnode - * and with all vnodes aliased to the requested vnode. - */ -int -vop_revoke(ap) - struct vop_revoke_args /* { - struct vnode *a_vp; - int a_flags; - } */ *ap; -{ - struct vnode *vp, *vq; - struct cdev *dev; - - KASSERT((ap->a_flags & REVOKEALL) != 0, ("vop_revoke")); - vp = ap->a_vp; - KASSERT((vp->v_type == VCHR), ("vop_revoke: not VCHR")); - - VI_LOCK(vp); - /* - * If a vgone (or vclean) is already in progress, - * wait until it is done and return. - */ - if (vp->v_iflag & VI_XLOCK) { - vp->v_iflag |= VI_XWANT; - msleep(vp, VI_MTX(vp), PINOD | PDROP, - "vop_revokeall", 0); - return (0); - } - VI_UNLOCK(vp); - dev = vp->v_rdev; - for (;;) { - dev_lock(); - vq = SLIST_FIRST(&dev->si_hlist); - dev_unlock(); - if (vq == NULL) - break; - vgone(vq); - } - return (0); -} - /* * Recycle an unused vnode to the front of the free list. * Release the passed interlock if the vnode will be recycled. diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index a866cb658a28..38a90ea0468d 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -690,7 +690,6 @@ int vop_stdunlock(struct vop_unlock_args *); int vop_nopoll(struct vop_poll_args *); int vop_stdpathconf(struct vop_pathconf_args *); int vop_stdpoll(struct vop_poll_args *); -int vop_revoke(struct vop_revoke_args *); int vop_eopnotsupp(struct vop_generic_args *ap); int vop_ebadf(struct vop_generic_args *ap); int vop_einval(struct vop_generic_args *ap);