- Revert kern/vfs_subr.c revision 1.444. The vm_object's size isn't
trustworthy for vnode-backed objects. - Restore the old behavior of vm_object_page_remove() when the end of the given range is zero. Add a comment to vm_object_page_remove() regarding this behavior. Reported by: iedowse
This commit is contained in:
parent
5daa806da0
commit
bff99f0d12
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114570
@ -1188,7 +1188,7 @@ vinvalbuf(vp, flags, cred, td, slpflag, slptimeo)
|
||||
*/
|
||||
if (VOP_GETVOBJECT(vp, &object) == 0) {
|
||||
VM_OBJECT_LOCK(object);
|
||||
vm_object_page_remove(object, 0, object->size,
|
||||
vm_object_page_remove(object, 0, 0,
|
||||
(flags & V_SAVE) ? TRUE : FALSE);
|
||||
VM_OBJECT_UNLOCK(object);
|
||||
}
|
||||
|
@ -1675,10 +1675,12 @@ vm_object_collapse(vm_object_t object)
|
||||
}
|
||||
|
||||
/*
|
||||
* vm_object_page_remove: [internal]
|
||||
* vm_object_page_remove:
|
||||
*
|
||||
* Removes all physical pages in the specified
|
||||
* object range from the object's list of pages.
|
||||
* Removes all physical pages in the given range from the
|
||||
* object's list of pages. If the range's end is zero, all
|
||||
* physical pages from the range's start to the end of the object
|
||||
* are deleted.
|
||||
*
|
||||
* The object must be locked.
|
||||
*/
|
||||
@ -1716,7 +1718,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end,
|
||||
* or (2) NULL.
|
||||
*/
|
||||
for (;
|
||||
p != NULL && p->pindex < end;
|
||||
p != NULL && (p->pindex < end || end == 0);
|
||||
p = next) {
|
||||
next = TAILQ_NEXT(p, listq);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user