summaryrefslogtreecommitdiffstats
path: root/sys/isofs/cd9660
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-11-02 20:16:55 +0000
committerpeter <peter@FreeBSD.org>2002-11-02 20:16:55 +0000
commitc56ef69f56cf26bde1ff844e279637232cbf87b4 (patch)
tree380a491dce0a8233db40537be230195ad3ab4bc1 /sys/isofs/cd9660
parenta79bd334d7e17ece4fe4564b52efa3cc9c299a31 (diff)
downloadFreeBSD-src-c56ef69f56cf26bde1ff844e279637232cbf87b4.zip
FreeBSD-src-c56ef69f56cf26bde1ff844e279637232cbf87b4.tar.gz
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
Diffstat (limited to 'sys/isofs/cd9660')
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index c25d4bb..a44df4c 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -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);
OpenPOWER on IntegriCloud