o Lock page queue accesses by vm_page_unmanage().

o Assert that the page queues lock is held in vm_page_unmanage().
This commit is contained in:
Alan Cox 2002-07-13 23:55:30 +00:00
parent d2efbba584
commit eed6f3fd45
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99934
2 changed files with 3 additions and 0 deletions

View File

@ -147,7 +147,9 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage)
vm_page_zero_fill(m[i]);
vm_page_flag_set(m[i], PG_ZERO);
/* Switch off pv_entries */
vm_page_lock_queues();
vm_page_unmanage(m[i]);
vm_page_unlock_queues();
m[i]->valid = VM_PAGE_BITS_ALL;
m[i]->dirty = 0;
/* The requested page must remain busy, the others not. */

View File

@ -1211,6 +1211,7 @@ vm_page_unmanage(vm_page_t m)
int s;
s = splvm();
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if ((m->flags & PG_UNMANAGED) == 0) {
if (m->wire_count == 0)
vm_pageq_remove(m);