Modify vm_map_clean() (and thus the msync(2) system call) to support

invalidation of cached pages for objects of type OBJT_DEVICE.

Submitted by:	Christian Zander <zander@minion.de>
Approved by:	alc
This commit is contained in:
mdodd 2002-09-22 08:22:32 +00:00
parent 491569a0a7
commit 2ecda740f8

View File

@ -1920,16 +1920,19 @@ vm_map_clean(
OFF_TO_IDX(offset),
OFF_TO_IDX(offset + size + PAGE_MASK),
flags);
if (invalidate) {
/*vm_object_pip_wait(object, "objmcl");*/
vm_object_page_remove(object,
OFF_TO_IDX(offset),
OFF_TO_IDX(offset + size + PAGE_MASK),
FALSE);
}
VOP_UNLOCK(object->handle, 0, curthread);
vm_object_deallocate(object);
}
if (object && invalidate &&
((object->type == OBJT_VNODE) ||
(object->type == OBJT_DEVICE))) {
vm_object_reference(object);
vm_object_page_remove(object,
OFF_TO_IDX(offset),
OFF_TO_IDX(offset + size + PAGE_MASK),
FALSE);
vm_object_deallocate(object);
}
start += size;
}