shithub: riscv

Download patch

ref: 16c1cc99ec6db23f8d7b056127c77a4dcf14f2b5
parent: feda4b1ed25f37676b23d3ee35aa44e14257a6b0
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Jan 3 23:46:30 EST 2024

kernel: .... aaand devswap :)

--- a/sys/src/9/port/devswap.c
+++ b/sys/src/9/port/devswap.c
@@ -188,7 +188,7 @@
 					goto Killbig;
 				x = 0;
 			}
-		} while(p->state == Dead || p->noswap || !canqlock(&p->seglock));
+		} while(p->state <= New || p->noswap || !canqlock(&p->seglock));
 		up->psstate = "Pageout";
 		for(i = 0; i < NSEG; i++) {
 			if((s = p->seg[i]) != nil) {
@@ -274,7 +274,7 @@
 	 * entries for this segment will be flushed if we succeed in paging it out
 	 */
 	for(x = 0; (p = proctab(x)) != nil; x++){
-		if(p->state == Dead)
+		if(p->state <= New)
 			continue;
 		for(i = 0; i < NSEG; i++){
 			if(p->seg[i] == s)