summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_anon.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2021-03-04 09:00:04 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2021-03-04 09:00:04 +0000
commit37b9299798a2191b795af5df5e914fc9f722cd55 (patch)
tree3dc9d8667acfde0eee75049207c5388bd9fd9934 /sys/uvm/uvm_anon.c
parentf09c45ba7cb505684038d40e812a897c865feb22 (diff)
Modify `uvmexp.swpgonly' atomically, required for uvm_fault() w/o KERNEL_LOCK()
ok kettenis@
Diffstat (limited to 'sys/uvm/uvm_anon.c')
-rw-r--r--sys/uvm/uvm_anon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_anon.c b/sys/uvm/uvm_anon.c
index b64321410da..2ae8dacc482 100644
--- a/sys/uvm/uvm_anon.c
+++ b/sys/uvm/uvm_anon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_anon.c,v 1.51 2021/01/19 13:21:36 mpi Exp $ */
+/* $OpenBSD: uvm_anon.c,v 1.52 2021/03/04 09:00:03 mpi Exp $ */
/* $NetBSD: uvm_anon.c,v 1.10 2000/11/25 06:27:59 chs Exp $ */
/*
@@ -120,9 +120,9 @@ uvm_anfree_list(struct vm_anon *anon, struct pglist *pgl)
}
} else {
if (anon->an_swslot != 0) {
- /* this page is no longer only in swap. */
+ /* This page is no longer only in swap. */
KASSERT(uvmexp.swpgonly > 0);
- uvmexp.swpgonly--;
+ atomic_dec_int(&uvmexp.swpgonly);
}
}
anon->an_lock = NULL;