summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devproc.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-09-19 02:24:23 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2019-09-19 02:24:23 +0200
commitc45458b929e0f8e5eb26fd97c844977c893f6262 (patch)
treefc5335c2579827b9bcfee1f69062cf961abc234b /sys/src/9/port/devproc.c
parent24d1fbde273f30422d852811d3724ede789acd0d (diff)
devproc: move proctab() call after Qnotepg special case in procwrite()
Diffstat (limited to 'sys/src/9/port/devproc.c')
-rw-r--r--sys/src/9/port/devproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/port/devproc.c b/sys/src/9/port/devproc.c
index 699283f5b..46b1da846 100644
--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -1158,8 +1158,6 @@ procwrite(Chan *c, void *va, long n, vlong off)
if(c->qid.type & QTDIR)
error(Eisdir);
- p = proctab(SLOT(c->qid));
-
/* Use the remembered noteid in the channel rather
* than the process pgrpid
*/
@@ -1172,6 +1170,8 @@ procwrite(Chan *c, void *va, long n, vlong off)
return n;
}
+ p = proctab(SLOT(c->qid));
+
eqlock(&p->debug);
if(waserror()){
qunlock(&p->debug);