- Relax the Giant required in vm_page_remove().

- Remove the Giant required from vm_page_free_toq().  (Any locking
   errors will be caught by vm_page_remove().)

This remedies a panic that occurred when kmem_malloc(NOWAIT) performed
without Giant failed to allocate the necessary pages.

Reported by:	phk
This commit is contained in:
Alan Cox 2003-04-25 06:35:05 +00:00
parent ef812d2f36
commit 5299887de5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114003

View File

@ -599,11 +599,11 @@ vm_page_remove(vm_page_t m)
vm_object_t object;
vm_page_t root;
GIANT_REQUIRED;
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
if (m->object == NULL)
return;
if (!VM_OBJECT_LOCKED(m->object))
GIANT_REQUIRED;
if ((m->flags & PG_BUSY) == 0) {
panic("vm_page_remove: page not busy");
}
@ -1030,7 +1030,6 @@ vm_page_free_toq(vm_page_t m)
struct vpgqueues *pq;
vm_object_t object = m->object;
GIANT_REQUIRED;
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
s = splvm();
cnt.v_tfree++;