Two changes: (1) Use vm_page_unqueue_nowakeup in vm_page_alloc

instead of duplicating the code.  (2) If a wired page is passed
to vm_page_free_toq, panic instead of printing a friendly warning.
(If we don't panic here, we'll just panic later in vm_page_unwire
obscuring the problem.)
This commit is contained in:
Alan Cox 1999-11-10 05:23:19 +00:00
parent 658248453e
commit e6ce529511
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53074

View File

@ -817,13 +817,7 @@ loop:
* Remove from free queue
*/
{
struct vpgqueues *pq = &vm_page_queues[m->queue];
TAILQ_REMOVE(&pq->pl, m, pageq);
(*pq->cnt)--;
pq->lcnt--;
}
vm_page_unqueue_nowakeup(m);
/*
* Initialize structure. Only the PG_ZERO flag is inherited.
@ -841,7 +835,6 @@ loop:
m->busy = 0;
m->valid = 0;
KASSERT(m->dirty == 0, ("vm_page_alloc: free/cache page %p was dirty", m));
m->queue = PQ_NONE;
/*
* vm_page_insert() is safe prior to the splx(). Note also that
@ -1106,9 +1099,7 @@ vm_page_free_toq(vm_page_t m)
m->wire_count, (long)m->pindex);
}
#endif
printf("vm_page_free: freeing wired page\n");
m->wire_count = 0;
cnt.v_wire_count--;
panic("vm_page_free: freeing wired page\n");
}
/*