--- src/sys/kern/vfs_subr.c 2008/05/18 05:54:25 1.114 +++ src/sys/kern/vfs_subr.c 2008/07/12 01:09:46 1.115 @@ -1056,6 +1056,23 @@ addaliasu(struct vnode *nvp, int x, int } /* + * Simple call that a filesystem can make to try to get rid of a + * vnode. It will fail if anyone is referencing the vnode (including + * the caller). + * + * The filesystem can check whether its in-memory inode structure still + * references the vp on return. + */ +void +vclean_unlocked(struct vnode *vp) +{ + vx_get(vp); + if (sysref_isactive(&vp->v_sysref) == 0) + vclean_vxlocked(vp, 0); + vx_put(vp); +} + +/* * Disassociate a vnode from its underlying filesystem. * * The vnode must be VX locked and referenced. In all normal situations