1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

vm_object_deallocate(): Remove no longer needed code.

We track text mappings explicitly, there is no removal of the text
refs on the object deallocate any more, so tmpfs objects should not be
treated specially. Doing so causes excess deref.

Reported and tested by:	gallatin
Reviewed by:	markj
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D21560
This commit is contained in:
Konstantin Belousov 2019-09-07 16:01:45 +00:00
parent 4f49b435c8
commit 0e79619e1e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352014

View File

@ -508,7 +508,6 @@ void
vm_object_deallocate(vm_object_t object)
{
vm_object_t temp;
struct vnode *vp;
while (object != NULL) {
VM_OBJECT_WLOCK(object);
@ -531,25 +530,6 @@ vm_object_deallocate(vm_object_t object)
VM_OBJECT_WUNLOCK(object);
return;
} else if (object->ref_count == 1) {
if (object->type == OBJT_SWAP &&
(object->flags & OBJ_TMPFS) != 0) {
vp = object->un_pager.swp.swp_tmpfs;
vhold(vp);
VM_OBJECT_WUNLOCK(object);
vn_lock(vp, LK_SHARED | LK_RETRY);
VM_OBJECT_WLOCK(object);
if (object->type == OBJT_DEAD ||
object->ref_count != 1) {
VM_OBJECT_WUNLOCK(object);
VOP_UNLOCK(vp, 0);
vdrop(vp);
return;
}
if ((object->flags & OBJ_TMPFS) != 0)
VOP_UNSET_TEXT(vp);
VOP_UNLOCK(vp, 0);
vdrop(vp);
}
if (object->shadow_count == 0 &&
object->handle == NULL &&
(object->type == OBJT_DEFAULT ||