From f0cd9c6361465095959d33ba2b546c01d4ad1481 Mon Sep 17 00:00:00 2001 From: alc Date: Wed, 10 Nov 1999 05:23:19 +0000 Subject: 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.) --- sys/vm/vm_page.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 6dfac16..078743f 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -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"); } /* -- cgit v1.1