9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] [PATCH] exportfs: fix clunk of first attach with -S
Date: Sun, 16 Oct 2022 18:04:55 -0400	[thread overview]
Message-ID: <EF1AD2D6F903236D411CD3A08640FC81@eigenstate.org> (raw)
In-Reply-To: <71D81C816314EDF35CE6A906B468E97B@mforney.org>

Quoth Michael Forney <mforney@mforney.org>:
> 
> 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;	
>  }


      reply	other threads:[~2022-10-16 22:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 19:35 Michael Forney
2022-10-16 22:04 ` ori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=EF1AD2D6F903236D411CD3A08640FC81@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).