From a28042d1e350d0517edb890b5ef4d00d37fe409e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 28 May 2009 07:26:36 +0000 Subject: [PATCH] Change vm_object_page_remove() such that it clears the page's dirty bits when it invalidates the page. Suggested by: tegge --- sys/vm/vm_object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 34332f69184..d98f944477a 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1902,8 +1902,10 @@ again: pmap_remove_all(p); /* Account for removal of managed, wired mappings. */ p->wire_count -= wirings; - if (!clean_only) + if (!clean_only) { p->valid = 0; + vm_page_undirty(p); + } continue; } if (vm_page_sleep_if_busy(p, TRUE, "vmopar"))