summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriane van der Steldt <ariane@cvs.openbsd.org>2009-05-08 15:10:36 +0000
committerAriane van der Steldt <ariane@cvs.openbsd.org>2009-05-08 15:10:36 +0000
commitc4358b3e9101b68c0ddf18237dbd6fd8bf395ffe (patch)
treea511e964d6ff5b21a02ae1583c7497ef9b15228a
parent5fdae45f8253ad24f24e409f174e63ba4e65f4cc (diff)
Clear PQ_AOBJ at pageremove: when a page is no longer part of a uvm_object,
it is also not part of an aobj. Clear anon flags at pagefree: page is no longer part of an anon. ok oga
-rw-r--r--sys/uvm/uvm_page.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index ea5bbf37d00..39008ac0c19 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.79 2009/05/08 13:50:15 ariane Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.80 2009/05/08 15:10:35 ariane Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -195,7 +195,7 @@ uvm_pageremove(struct vm_page *pg)
/* object should be locked */
TAILQ_REMOVE(&pg->uobject->memq, pg, listq);
- atomic_clearbits_int(&pg->pg_flags, PG_TABLED);
+ atomic_clearbits_int(&pg->pg_flags, PG_TABLED|PQ_AOBJ);
pg->uobject->uo_npages--;
pg->uobject = NULL;
pg->pg_version++;
@@ -1186,7 +1186,9 @@ uvm_pagefree(struct vm_page *pg)
uvmexp.wired--;
}
if (pg->uanon) {
+ atomic_clearbits_int(&pg->pg_flags, PQ_ANON);
pg->uanon->an_page = NULL;
+ pg->uanon = NULL;
#ifdef UBC
uvm_pgcnt_anon--;
#endif