Revision 1.246 should have also included

- Weaken the assertion in vm_page_insert() to require Giant only if the
   vm_object isn't locked.

Reported by:	 "Ilmar S. Habibulin" <ilmar@watson.org>
This commit is contained in:
Alan Cox 2003-04-22 14:26:02 +00:00
parent 7cc7315cfb
commit 2e9d00a15d

View File

@ -532,6 +532,8 @@ vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex)
{
vm_page_t root;
if (!VM_OBJECT_LOCKED(object))
GIANT_REQUIRED;
if (m->object != NULL)
panic("vm_page_insert: already inserted");
@ -541,7 +543,6 @@ vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex)
m->object = object;
m->pindex = pindex;
mtx_assert(object == kmem_object ? &object->mtx : &Giant, MA_OWNED);
/*
* Now link into the object's ordered list of backed pages.
*/