Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!wlbr!sms From: sms@etn-wlv.eaton.com (Steven M. Schultz) Newsgroups: comp.bugs.2bsd Subject: multiple mounts on a directory + FIX Keywords: mount Message-ID: <28104@wlbr.EATON.COM> Date: 22 Mar 89 23:07:56 GMT Sender: news@wlbr.EATON.COM Reply-To: sms@etn-wlv.eaton.com (Steven M. Schultz) Organization: Eaton IMSD Lines: 36 Index: /usr/src/sys/sys/ufs_mount.c 2.10BSD 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;