Remove an incorrect KASSERT() introduced in previous.
authormpi <mpi@openbsd.org>
Thu, 30 Jun 2022 13:54:37 +0000 (13:54 +0000)
committermpi <mpi@openbsd.org>
Thu, 30 Jun 2022 13:54:37 +0000 (13:54 +0000)
If uvm_pagermapin() fails that doesn't mean the emergency pages aren't
in use.  In OOM situation, a single segment can still be held by an
asynchronous write so the second call to uvm_pagermapin() can fail.

sys/uvm/uvm_swap.c

index 609c54c..6516adb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: uvm_swap.c,v 1.158 2022/06/28 19:39:54 mpi Exp $      */
+/*     $OpenBSD: uvm_swap.c,v 1.159 2022/06/30 13:54:37 mpi Exp $      */
 /*     $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $        */
 
 /*
@@ -1725,7 +1725,6 @@ uvm_swap_io(struct vm_page **pps, int startslot, int npages, int flags)
 
                bouncekva = uvm_pagermapin(tpps, npages, swmapflags);
                if (bouncekva == 0) {
-                       KASSERT(tpps[0] != oompps[0]);
                        pool_put(&bufpool, bp);
                        uvm_pagermapout(kva, npages);
                        uvm_swap_freepages(tpps, npages);