shithub: riscv

Download patch

ref: 316230f6258b96331039f5cc1b72307e4ce5827b
parent: 1da20fd5d8fc4c6677b52327e1e45e3279af42fd
author: Jacob Moody <moody@posixcafe.org>
date: Thu May 19 00:45:06 EDT 2022

kernel: remove dead case from devpipe

This code is checking the return of devwalk for
a walk resulting in a clone of an open pipe file. However,
devclone ensures that the chan we are cloning is not
currently open.

--- a/sys/src/9/port/devpipe.c
+++ b/sys/src/9/port/devpipe.c
@@ -136,17 +136,6 @@
 		p = c->aux;
 		qlock(p);
 		p->ref++;
-		if(c->flag & COPEN){
-			print("channel open in pipewalk\n");
-			switch(NETTYPE(c->qid.path)){
-			case Qdata0:
-				p->qref[0]++;
-				break;
-			case Qdata1:
-				p->qref[1]++;
-				break;
-			}
-		}
 		qunlock(p);
 	}
 	return wq;