mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
1302dabd28
commit
4a2eca23ca
1 changed files with 10 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue