summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-28 08:56:48 +0000
committerphk <phk@FreeBSD.org>2005-01-28 08:56:48 +0000
commit9b1a8ec7bf2e28c5ce416bea40eb8a47b74b09ef (patch)
treef4b1cc4e11ee18932c18b5cd9488e2a1752f1a30 /sys/kern
parentf0f541eae7d995ac72ebcd962b26b615607e04c2 (diff)
downloadFreeBSD-src-9b1a8ec7bf2e28c5ce416bea40eb8a47b74b09ef.zip
FreeBSD-src-9b1a8ec7bf2e28c5ce416bea40eb8a47b74b09ef.tar.gz
Move the contents of vop_stddestroyvobject() to the new vnode_pager
function vnode_destroy_vobject(). Make the new function zero the vp->v_object pointer so we can tell if a call is missing.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_default.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 1798a9e..73643e0 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -366,32 +366,8 @@ vop_stddestroyvobject(ap)
struct vnode *vp;
} */ *ap;
{
- struct vnode *vp = ap->a_vp;
- vm_object_t obj = vp->v_object;
-
- if (obj == NULL)
- return (0);
- VM_OBJECT_LOCK(obj);
- if (obj->ref_count == 0) {
- /*
- * vclean() may be called twice. The first time
- * removes the primary reference to the object,
- * the second time goes one further and is a
- * special-case to terminate the object.
- *
- * don't double-terminate the object
- */
- if ((obj->flags & OBJ_DEAD) == 0)
- vm_object_terminate(obj);
- else
- VM_OBJECT_UNLOCK(obj);
- } else {
- /*
- * Woe to the process that tries to page now :-).
- */
- vm_pager_deallocate(obj);
- VM_OBJECT_UNLOCK(obj);
- }
+
+ vnode_destroy_vobject(ap->a_vp);
return (0);
}
OpenPOWER on IntegriCloud