Detect root mount attempts on the flag, not on the NULL path.

This commit is contained in:
Poul-Henning Kamp 2004-11-09 22:21:52 +00:00
parent 64042a76b6
commit 282d0382ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137480
4 changed files with 4 additions and 4 deletions

View File

@ -201,7 +201,7 @@ cd9660_omount(mp, path, data, td)
struct iso_mnt *imp = 0;
struct nameidata ndp;
if (path == NULL) /* We are doing the initial root mount */
if (mp->mnt_flag & MNT_ROOTFS)
return (iso_mountroot(mp, td));
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
return (error);

View File

@ -114,7 +114,7 @@ ntfs_omount (
/*
* Use NULL path to flag a root mount
*/
if( path == NULL) {
if (mp->mnt_flag & MNT_ROOTFS) {
/*
***
* Mounting root filesystem

View File

@ -201,7 +201,7 @@ cd9660_omount(mp, path, data, td)
struct iso_mnt *imp = 0;
struct nameidata ndp;
if (path == NULL) /* We are doing the initial root mount */
if (mp->mnt_flag & MNT_ROOTFS)
return (iso_mountroot(mp, td));
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
return (error);

View File

@ -678,7 +678,7 @@ nfs_omount(struct mount *mp, char *path, caddr_t data, struct thread *td)
size_t len;
u_char nfh[NFSX_V3FHMAX];
if (path == NULL)
if (mp->mnt_flag & MNT_ROOTFS)
return (nfs_mountroot(mp, td));
error = copyin(data, (caddr_t)&args, sizeof (struct nfs_args));
if (error)