It has not been possible to recursively terminate a vnode object for some time

now.  Eliminate the dead code that supports it.

Approved by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D22908
This commit is contained in:
Jeff Roberson 2020-01-19 18:36:03 +00:00
parent 98087a066f
commit 9c83ff2d86

View File

@ -200,10 +200,8 @@ vnode_destroy_vobject(struct vnode *vp)
MPASS(obj->type == OBJT_VNODE);
umtx_shm_object_terminated(obj);
if (obj->ref_count == 0) {
/*
* don't double-terminate the object
*/
if ((obj->flags & OBJ_DEAD) == 0) {
KASSERT((obj->flags & OBJ_DEAD) == 0,
("vnode_destroy_vobject: Terminating dead object"));
vm_object_set_flag(obj, OBJ_DEAD);
/*
@ -220,16 +218,6 @@ vnode_destroy_vobject(struct vnode *vp)
VM_OBJECT_WLOCK(obj);
vm_object_terminate(obj);
} else {
/*
* Waiters were already handled during object
* termination. The exclusive vnode lock hopefully
* prevented new waiters from referencing the dying
* object.
*/
vp->v_object = NULL;
VM_OBJECT_WUNLOCK(obj);
}
} else {
/*
* Woe to the process that tries to page now :-).