diff options
author | peter <peter@FreeBSD.org> | 2002-11-02 20:16:55 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-11-02 20:16:55 +0000 |
commit | c56ef69f56cf26bde1ff844e279637232cbf87b4 (patch) | |
tree | 380a491dce0a8233db40537be230195ad3ab4bc1 /sys | |
parent | a79bd334d7e17ece4fe4564b52efa3cc9c299a31 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 3 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index c25d4bb..a44df4c 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/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); 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); |