Subject: Re: How to unmount a double mounted directory?
To: None <minoura@kw.netlaputa.or.jp (MINOURA Makoto />
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: current-users
Date: 10/29/1997 15:37:57
Excerpts from netbsd: 29-Oct-97 Re: How to unmount a double..
PxsoQg==?=@kw.netlaputa. (538*)

> Matthias> > > # umount -g /usr/local
> Matthias> > > /dev/sd0g: unmount from /usr/local
> Matthias> > > umount: /usr/local: Device busy
> 
> this message is not correct, or at least, not appropriate,
> isn't it?

Yes, as I wrote, there are some weaknesses in mount/unmount wrt
filesystem stacking. This one seems easy to correct - would you
try the appended patch?

best regards
Matthias


Index: umount.c
===================================================================
RCS file: /cvsroot/src/sbin/umount/umount.c,v
retrieving revision 1.20
diff -c -2 -r1.20 umount.c
*** umount.c	1997/09/16 12:24:06	1.20
--- umount.c	1997/10/29 14:32:33
***************
*** 326,330 ****
  		return (NULL);
  	}
! 	for (i = 0; i < mntsize; i++) {
  		if ((what == MNTON) && !strcmp(mntbuf[i].f_mntfromname, name)) {
  			if (type)
--- 326,330 ----
  		return (NULL);
  	}
! 	for (i = mntsize - 1; i >= 0; i--) {
  		if ((what == MNTON) && !strcmp(mntbuf[i].f_mntfromname, name)) {
  			if (type)