In vm_page_set_invalid() invalidate all of the page's mappings as soon as

any part of the page's contents is invalidated.

Submitted by: tegge
This commit is contained in:
Alan Cox 2006-01-24 07:21:38 +00:00
parent c283464ab7
commit fc3c1bc471
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154764

View File

@ -1558,6 +1558,8 @@ vm_page_set_invalid(vm_page_t m, int base, int size)
VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
bits = vm_page_bits(base, size);
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if (m->valid == VM_PAGE_BITS_ALL && bits != 0)
pmap_remove_all(m);
m->valid &= ~bits;
m->dirty &= ~bits;
m->object->generation++;