From 4f7816f65bf3006b3134c1b37a404c8d68160916 Mon Sep 17 00:00:00 2001 From: kettenis Date: Wed, 30 Apr 2014 19:25:14 +0000 Subject: [PATCH] Make sure we flush discarded pages even if the number of hash buckets doesn't change. From Pedro Martelletto via bitrig. ok beck@, krw@ --- sys/uvm/uvm_aobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/uvm/uvm_aobj.c b/sys/uvm/uvm_aobj.c index 6249c8509eb..173d469f584 100644 --- a/sys/uvm/uvm_aobj.c +++ b/sys/uvm/uvm_aobj.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_aobj.c,v 1.62 2014/04/30 16:07:31 kettenis Exp $ */ +/* $OpenBSD: uvm_aobj.c,v 1.63 2014/04/30 19:25:14 kettenis Exp $ */ /* $NetBSD: uvm_aobj.c,v 1.39 2001/02/18 21:19:08 chs Exp $ */ /* @@ -442,6 +442,7 @@ uao_shrink_hash(struct uvm_object *uobj, int pages) * to adjust the page count. */ if (UAO_SWHASH_BUCKETS(aobj->u_pages) == UAO_SWHASH_BUCKETS(pages)) { + uao_shrink_flush(uobj, pages, aobj->u_pages); aobj->u_pages = pages; return 0; } -- 2.20.1