From fc55044eba6c4e23cfbfbb01cb9eaceffefa64ba Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 21 Nov 1997 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1997-11-21 --- port/chan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/port/chan.c b/port/chan.c index 04e4bc67fd1d2cfabc502f051b564bf117ec568e..16e45e1df1182997cdd09e980c0d7c3e02d77c05 100644 --- a/port/chan.c +++ b/port/chan.c @@ -348,9 +348,10 @@ domount(Chan *c) Chan* undomount(Chan *c) { + Chan *nc; Pgrp *pg; - Mhead **h, **he, *f; Mount *t; + Mhead **h, **he, *f; pg = up->pgrp; rlock(&pg->ns); @@ -364,8 +365,9 @@ undomount(Chan *c) for(f = *h; f; f = f->hash) { for(t = f->mount; t; t = t->next) { if(eqchan(c, t->to, 1)) { + nc = cclone(t->head->from, 0); cclose(c); - c = cclone(t->head->from, 0); + c = nc; break; } }