diff options
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/hpfs/hpfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 3 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 3 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 3 | ||||
-rw-r--r-- | sys/kern/init_main.c | 1 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/sys/systm.h | 2 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 4 |
11 files changed, 14 insertions, 15 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 10e3bc4..7c83449 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -144,6 +144,7 @@ iso_mountroot(mp, td) struct thread *td; { struct iso_args args; + struct vnode *rootvp; int error; if ((error = bdevvp(rootdev, &rootvp))) { @@ -297,7 +298,7 @@ iso_mountfs(devvp, mp, td, argp) */ if ((error = vfs_mountedon(devvp))) return error; - if (vcount(devvp) > 1 && devvp != rootvp) + if (vcount(devvp) > 1) return EBUSY; if ((error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0))) return (error); diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index 1459ed8..9ea6cfb 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -232,7 +232,7 @@ hpfs_mountfs(devvp, mp, argsp, td) ncount = vcount(devvp); if (devvp->v_object) ncount -= 1; - if (ncount > 1 && devvp != rootvp) + if (ncount > 1) return (EBUSY); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index ee6c507..b54f6ec 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -326,7 +326,7 @@ mountmsdosfs(devvp, mp, td, argp) error = vfs_mountedon(devvp); if (error) return (error); - if (vcount(devvp) > 1 && devvp != rootvp) + if (vcount(devvp) > 1) return (EBUSY); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0); diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index 7db1a13..a9a9c7a 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -105,7 +105,7 @@ ntfs_mount ( { size_t size; int err = 0; - struct vnode *devvp; + struct vnode *devvp, *rootvp; struct ntfs_args args; /* @@ -289,7 +289,7 @@ ntfs_mountfs(devvp, mp, argsp, td) ncount = vcount(devvp); if (devvp->v_object) ncount -= 1; - if (ncount > 1 && devvp != rootvp) + if (ncount > 1) return (EBUSY); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0); diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index b688236..73207d5 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -117,6 +117,7 @@ ext2_mountroot() { struct ext2_sb_info *fs; struct mount *mp; + struct vnode *rootvp; struct thread *td = curthread; struct ext2mount *ump; u_int size; @@ -642,7 +643,7 @@ ext2_mountfs(devvp, mp, td) */ if ((error = vfs_mountedon(devvp)) != 0) return (error); - if (vcount(devvp) > 1 && devvp != rootvp) + if (vcount(devvp) > 1) return (EBUSY); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0); diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index b688236..73207d5 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -117,6 +117,7 @@ ext2_mountroot() { struct ext2_sb_info *fs; struct mount *mp; + struct vnode *rootvp; struct thread *td = curthread; struct ext2mount *ump; u_int size; @@ -642,7 +643,7 @@ ext2_mountfs(devvp, mp, td) */ if ((error = vfs_mountedon(devvp)) != 0) return (error); - if (vcount(devvp) > 1 && devvp != rootvp) + if (vcount(devvp) > 1) return (EBUSY); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0); diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 10e3bc4..7c83449 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -144,6 +144,7 @@ iso_mountroot(mp, td) struct thread *td; { struct iso_args args; + struct vnode *rootvp; int error; if ((error = bdevvp(rootdev, &rootvp))) { @@ -297,7 +298,7 @@ iso_mountfs(devvp, mp, td, argp) */ if ((error = vfs_mountedon(devvp))) return error; - if (vcount(devvp) > 1 && devvp != rootvp) + if (vcount(devvp) > 1) return EBUSY; if ((error = vinvalbuf(devvp, V_SAVE, td->td_ucred, td, 0, 0))) return (error); diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 575f227..34b38c2 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -96,7 +96,6 @@ static struct filedesc0 filedesc0; struct vmspace vmspace0; struct proc *initproc; -struct vnode *rootvp; int boothowto = 0; /* initialized so that it can be patched */ SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, ""); int bootverbose; diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 7382343..f6281ac 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -479,8 +479,6 @@ nfs_mountroot(struct mount *mp, struct thread *td) return (error); } - rootvp = vp; - /* * This is not really an nfs issue, but it is much easier to * set hostname here and then let the "/etc/rc.xxx" files diff --git a/sys/sys/systm.h b/sys/sys/systm.h index ad25ec9..012f870 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -64,9 +64,7 @@ extern struct cv selwait; /* select conditional variable */ extern long physmem; /* physical memory */ extern struct cdev *rootdev; /* root device */ -extern struct cdev *rootdevs[2]; /* possible root devices */ extern char *rootdevnames[2]; /* names of possible root devices */ -extern struct vnode *rootvp; /* vnode equivalent to above */ extern int boothowto; /* reboot flags, from console subsystem */ extern int bootverbose; /* nonzero to print verbose messages */ diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 11cd8de..7cdf9f5 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -142,7 +142,7 @@ ffs_mount(mp, path, data, ndp, td) struct thread *td; /* process requesting mount*/ { size_t size; - struct vnode *devvp; + struct vnode *devvp, *rootvp; struct ufs_args args; struct ufsmount *ump = 0; struct fs *fs; @@ -565,7 +565,7 @@ ffs_mountfs(devvp, mp, td) error = vfs_mountedon(devvp); if (error) return (error); - if (vcount(devvp) > 1 && devvp != rootvp) + if (vcount(devvp) > 1) return (EBUSY); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); error = vinvalbuf(devvp, V_SAVE, cred, td, 0, 0); |