Unbreak MNT_UPDATE when running with cd as root. Detect mountroot by

checking for "path == NULL" (like ffs) rather than MNT_ROOT.  Otherwise
when you try and do an update or mountd does an NFS export, the remount
fails because the code tries to mount a fresh rootfs and gets an EBUSY.
The same bug is in 4.x (which is where I found it).

Sanity check by: mux
This commit is contained in:
Peter Wemm
2002-11-02 20:16:55 +00:00
parent e6faed4db0
commit fed044f22a
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -196,9 +196,8 @@ cd9660_mount(mp, path, data, ndp, td)
mode_t accessmode;
struct iso_mnt *imp = 0;
if ((mp->mnt_flag & MNT_ROOTFS) != 0) {
if (path == NULL) /* We are doing the initial root mount */
return (iso_mountroot(mp, td));
}
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
return (error);
+1 -2
View File
@@ -196,9 +196,8 @@ cd9660_mount(mp, path, data, ndp, td)
mode_t accessmode;
struct iso_mnt *imp = 0;
if ((mp->mnt_flag & MNT_ROOTFS) != 0) {
if (path == NULL) /* We are doing the initial root mount */
return (iso_mountroot(mp, td));
}
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
return (error);