multiple mounts on a directory + FIX

Steven M. Schultz sms at etn-wlv.eaton.com
Thu Mar 23 09:07:56 AEST 1989


Description:
	
	The same directory can be mounted on twice using different
	devices.  This causes confusion and possibly problems later on 
	when an umount is done.
	
Repeat-By:

	/etc/mount /dev/ra0h /usr
	/etc/mount /dev/ra1h /usr

	note that no error is issued, 

Fix:

	Apply the following patch to /usr/src/sys/sys/ufs_mount.c, it is
	safe to do this because the mount of the root filesystem does
	not go thru the smount() routine.


*** ufs_mount.c.ol	Wed Mar 22 14:13:34 1989
--- ufs_mount.c	Wed Mar 22 14:28:43 1989
***************
*** 52,57 ****
--- 52,62 ----
  		u.u_error = ENOTDIR;
  		return;
  	}
+ 	if (ip->i_number == ROOTINO) {
+ 		iput(ip);
+ 		u.u_error = EBUSY;
+ 		return;
+ 	}
  	fs = mountfs(dev, uap->ronly, ip);
  	if (fs == 0)
  		return;



More information about the Comp.bugs.2bsd mailing list