From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26878 invoked from network); 16 Oct 2022 22:06:23 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 16 Oct 2022 22:06:23 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 9front; Sun Oct 16 18:04:58 -0400 2022 Received: from stockyard ( [172.102.12.181]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 69f770c6 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Sun, 16 Oct 2022 15:04:57 -0700 (PDT) Message-ID: To: 9front@9front.org Date: Sun, 16 Oct 2022 18:04:55 -0400 From: ori@eigenstate.org In-Reply-To: <71D81C816314EDF35CE6A906B468E97B@mforney.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: flexible XMPP markup service-based injection solution Subject: Re: [9front] [PATCH] exportfs: fix clunk of first attach with -S Reply-To: 9front@9front.org Precedence: bulk Quoth Michael Forney : > > 0 is a valid mid so should not be used as a nil value, since then the > first mount (mid=0) will never be unmounted. ok by me. > --- > diff 8e2c59136fe37143189f1dca81f53d7c6e11463f a8f8a2e401734a83dc6f098bf57dd4ae5b0f815b > --- a/sys/src/cmd/exportfs/io.c > +++ b/sys/src/cmd/exportfs/io.c > @@ -119,7 +119,7 @@ > l = &fidhash(nr); > for(f = *l; f != nil; f = f->next) { > if(f->nr == nr) { > - if(f->mid) { > + if(f->mid != -1) { > snprint(buf, sizeof(buf), "/mnt/exportfs/%d", f->mid); > unmount(0, buf); > psmap[f->mid] = 0; > @@ -171,7 +171,7 @@ > *l = new; > new->nr = nr; > new->fid = -1; > - new->mid = 0; > + new->mid = -1; > > return new; > }