From: kettenis Date: Wed, 30 Apr 2014 19:25:14 +0000 (+0000) Subject: Make sure we flush discarded pages even if the number of hash buckets doesn't X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4f7816f65bf3006b3134c1b37a404c8d68160916;p=openbsd Make sure we flush discarded pages even if the number of hash buckets doesn't change. From Pedro Martelletto via bitrig. ok beck@, krw@ --- 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; }