summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2011-06-16 23:00:38 +0000
committeroga <oga@openbsd.org>2011-06-16 23:00:38 +0000
commitd083444ee61d218b259834575ff310b21bf98c3c (patch)
tree56d6a3bf69434e89a4c3c56e050052566ee92b2f
parentQEMU pretends to emulate a different prehistoric Intel host bridge. (diff)
downloadwireguard-openbsd-d083444ee61d218b259834575ff310b21bf98c3c.tar.xz
wireguard-openbsd-d083444ee61d218b259834575ff310b21bf98c3c.zip
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);
}