From ed06f155e1cd565ce1c2fe47be0b4f216e3e66b1 Mon Sep 17 00:00:00 2001 From: attilio Date: Fri, 6 Apr 2012 19:49:45 +0000 Subject: [PATCH] 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 --- sys/vm/vnode_pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index ada3acf9bcd7..492d9c716833 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -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; }