Satisfy vm_object uma zone destructor requirements after r282660 when

vnode object creation raced.

Reported by:	pho
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
kib 2015-05-10 08:21:03 +00:00
parent d46813ebcd
commit cb622d9740

View File

@ -237,6 +237,12 @@ vnode_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
* Object has been created while we were sleeping
*/
VI_UNLOCK(vp);
VM_OBJECT_WLOCK(object);
KASSERT(object->ref_count == 1,
("leaked ref %p %d", object, object->ref_count));
object->type = OBJT_DEAD;
object->ref_count = 0;
VM_OBJECT_WUNLOCK(object);
vm_object_destroy(object);
goto retry;
}