Free a cached page rather than only removing it.

vm_page_cache_remove() should only be used in very little and specific
cases (and marked as static likely) where the callers is going to take
care also of the page flags appropriately, otherwise one can end up
with a corrupted page.

Reported by:	pho
This commit is contained in:
attilio 2012-04-06 19:49:45 +00:00
parent 123a5d3cc4
commit ed06f155e1

View File

@ -416,7 +416,7 @@ vnode_pager_setsize(vp, nsize)
drop = NULL;
mtx_lock(&vm_page_queue_free_mtx);
if (m->object == object) {
vm_page_cache_remove(m);
vm_page_cache_free(m);
if (object->cached_page_count == 0)
drop = vp;
}