The previous revision, updating vm_object_page_remove() for the new page

cache, did not account for the case where the vm object has nothing but
cached pages.

Reported by:	kris, tegge
Reviewed by:	tegge
MFC after:	3 days
This commit is contained in:
Alan Cox 2007-10-18 23:02:18 +00:00
parent c899450b21
commit 2573269111

View File

@ -1800,7 +1800,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end,
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
if (object->resident_page_count == 0)
return;
goto skipmemq;
/*
* Since physically-backed objects do not use managed pages, we can't
@ -1849,6 +1849,7 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t start, vm_pindex_t end,
}
vm_page_unlock_queues();
vm_object_pip_wakeup(object);
skipmemq:
if (__predict_false(object->cache != NULL))
vm_page_cache_free(object, start, end);
}