summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2023-10-24 10:00:23 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2023-10-24 10:00:23 +0000
commit1ea6d006562394b0507a4f27c3814192b09cbb97 (patch)
treeebcdf89ffb0bc6626afed20d76c71ced1714e2dd /sys
parent9eef72e355f09c6f57da29f528189920d4871325 (diff)
Merge two equivalent if blocks.
No functional change, ok tb@
Diffstat (limited to 'sys')
-rw-r--r--sys/uvm/uvm_pdaemon.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/uvm/uvm_pdaemon.c b/sys/uvm/uvm_pdaemon.c
index 9c3cc6c0f91..445102eed80 100644
--- a/sys/uvm/uvm_pdaemon.c
+++ b/sys/uvm/uvm_pdaemon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pdaemon.c,v 1.107 2023/10/16 11:32:54 mpi Exp $ */
+/* $OpenBSD: uvm_pdaemon.c,v 1.108 2023/10/24 10:00:22 mpi Exp $ */
/* $NetBSD: uvm_pdaemon.c,v 1.23 2000/08/20 10:24:14 bjh21 Exp $ */
/*
@@ -650,6 +650,11 @@ uvmpd_scan_inactive(struct uvm_pmalloc *pma,
p->offset >> PAGE_SHIFT,
swslot + swcpages);
swcpages++;
+ rw_exit(slock);
+
+ /* cluster not full yet? */
+ if (swcpages < swnpages)
+ continue;
}
} else {
/* if p == NULL we must be doing a last swap i/o */
@@ -666,14 +671,6 @@ uvmpd_scan_inactive(struct uvm_pmalloc *pma,
* for object pages, we always do the pageout.
*/
if (swap_backed) {
- if (p) { /* if we just added a page to cluster */
- rw_exit(slock);
-
- /* cluster not full yet? */
- if (swcpages < swnpages)
- continue;
- }
-
/* starting I/O now... set up for it */
npages = swcpages;
ppsp = swpps;