Simplify the check for non-dumpable VM object types

OBJT_DEFAULT, _SWAP, _VNODE and _PHYS is exactly the set of
non-fictitious object types, so just check for OBJ_FICTITIOUS.  The
check no longer excludes dead objects, but such objects have to be
handled regardless.

No functional change intended.

Reviewed by:	alc, dougm, kib
Tested by:	pho
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26589
This commit is contained in:
Mark Johnston 2020-10-02 17:49:13 +00:00
parent 3f59a7f97b
commit fec41f0751

View File

@ -1760,7 +1760,7 @@ each_dumpable_segment(struct thread *td, segment_callback func, void *closure)
vm_map_t map = &p->p_vmspace->vm_map;
vm_map_entry_t entry;
vm_object_t backing_object, object;
boolean_t ignore_entry;
bool ignore_entry;
vm_map_lock_read(map);
VM_MAP_ENTRY_FOREACH(entry, map) {
@ -1799,9 +1799,7 @@ each_dumpable_segment(struct thread *td, segment_callback func, void *closure)
VM_OBJECT_RUNLOCK(object);
object = backing_object;
}
ignore_entry = object->type != OBJT_DEFAULT &&
object->type != OBJT_SWAP && object->type != OBJT_VNODE &&
object->type != OBJT_PHYS;
ignore_entry = (object->flags & OBJ_FICTITIOUS) != 0;
VM_OBJECT_RUNLOCK(object);
if (ignore_entry)
continue;