summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2011-06-16 23:00:39 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2011-06-16 23:00:39 +0000
commitd024a575a5b781d033c420954f7fe46c2ef1605a (patch)
tree611803cc809c528bb4a4d29b825cc72b7fd41d71
parent5daeabf9ee4968b33804f7f7bb13172784b9bb11 (diff)
Use the current page not he first page when working out whether to
deactivate pages after syncing. While here, don't check flags for PQ_INACTIVE (this is the only place outside uvm_page.c where this is done) because pagedeactivate does this already. First part from Christian Ehrhart, second from me. Both ok ariane@. I meant to commit this about a week ago, but accidentally commited to my local cvs mirror then forgot about it.
-rw-r--r--sys/uvm/uvm_vnode.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/uvm/uvm_vnode.c b/sys/uvm/uvm_vnode.c
index 92e80bd4b31..a70e6428088 100644
--- a/sys/uvm/uvm_vnode.c
+++ b/sys/uvm/uvm_vnode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_vnode.c,v 1.71 2010/05/18 04:41:14 dlg Exp $ */
+/* $OpenBSD: uvm_vnode.c,v 1.72 2011/06/16 23:00:38 oga Exp $ */
/* $NetBSD: uvm_vnode.c,v 1.36 2000/11/24 20:34:01 chs Exp $ */
/*
@@ -780,8 +780,7 @@ uvn_flush(struct uvm_object *uobj, voff_t start, voff_t stop, int flags)
*/
if (!needs_clean) {
if (flags & PGO_DEACTIVATE) {
- if ((pp->pg_flags & PQ_INACTIVE) == 0 &&
- pp->wire_count == 0) {
+ if (pp->wire_count == 0) {
pmap_page_protect(pp, VM_PROT_NONE);
uvm_pagedeactivate(pp);
}
@@ -924,8 +923,7 @@ ReTry:
*/
if (flags & PGO_DEACTIVATE) {
- if ((pp->pg_flags & PQ_INACTIVE) == 0 &&
- pp->wire_count == 0) {
+ if (ptmp->wire_count == 0) {
pmap_page_protect(ptmp, VM_PROT_NONE);
uvm_pagedeactivate(ptmp);
}