1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Blow away the v_specmountpoint define, replacing it with what it was

defined as (rdev->si_mountpoint)
This commit is contained in:
Eivind Eklund 2000-10-09 17:31:39 +00:00
parent 7925558e0a
commit 7eb9fca557
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66886
18 changed files with 46 additions and 56 deletions

View File

@ -438,7 +438,7 @@ iso_mountfs(devvp, mp, p, argp)
isomp->im_dev = dev;
isomp->im_devvp = devvp;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
/* Check the Rock Ridge Extention support */
if (!(argp->flags & ISOFSMNT_NORRIP)) {
@ -505,7 +505,7 @@ iso_mountfs(devvp, mp, p, argp)
return 0;
out:
devvp->v_specmountpoint = NULL;
devvp->v_rdev->si_mountpoint = NULL;
if (bp)
brelse(bp);
if (pribp)
@ -545,7 +545,7 @@ cd9660_unmount(mp, mntflags, p)
isomp = VFSTOISOFS(mp);
isomp->im_devvp->v_specmountpoint = NULL;
isomp->im_devvp->v_rdev->si_mountpoint = NULL;
error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
vrele(isomp->im_devvp);
free((caddr_t)isomp, M_ISOFSMNT);

View File

@ -439,7 +439,7 @@ hpfs_mountfs(devvp, mp, argsp, p)
#endif
mp->mnt_maxsymlinklen = 0;
mp->mnt_flag |= MNT_LOCAL;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
return (0);
failed:
@ -447,7 +447,7 @@ hpfs_mountfs(devvp, mp, argsp, p)
brelse (bp);
mp->mnt_data = (qaddr_t)NULL;
#if defined(__FreeBSD__)
devvp->v_specmountpoint = NULL;
devvp->v_rdev->si_mountpoint = NULL;
#else
devvp->v_specflags &= ~SI_MOUNTEDON;
#endif
@ -492,7 +492,7 @@ hpfs_unmount(
}
#if defined(__FreeBSD__)
hpmp->hpm_devvp->v_specmountpoint = NULL;
hpmp->hpm_devvp->v_rdev->si_mountpoint = NULL;
#else
hpmp->hpm_devvp->v_specflags &= ~SI_MOUNTEDON;
#endif

View File

@ -725,7 +725,7 @@ mountmsdosfs(devvp, mp, p, argp)
mp->mnt_stat.f_fsid.val[0] = dev2udev(dev);
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
mp->mnt_flag |= MNT_LOCAL;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
return 0;
@ -761,7 +761,7 @@ msdosfs_unmount(mp, mntflags, p)
if (error)
return error;
pmp = VFSTOMSDOSFS(mp);
pmp->pm_devvp->v_specmountpoint = NULL;
pmp->pm_devvp->v_rdev->si_mountpoint = NULL;
#ifdef MSDOSFS_DEBUG
{
struct vnode *vp = pmp->pm_devvp;

View File

@ -605,7 +605,7 @@ ntfs_mountfs(devvp, mp, argsp, p)
#endif
mp->mnt_maxsymlinklen = 0;
mp->mnt_flag |= MNT_LOCAL;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
return (0);
out1:
@ -616,7 +616,7 @@ ntfs_mountfs(devvp, mp, argsp, p)
dprintf(("ntfs_mountfs: vflush failed\n"));
out:
devvp->v_specmountpoint = NULL;
devvp->v_rdev->si_mountpoint = NULL;
if (bp)
brelse(bp);
@ -685,7 +685,7 @@ ntfs_unmount(
* field is NULL and touching it causes null pointer derefercence.
*/
if (ntmp->ntm_devvp->v_type != VBAD)
ntmp->ntm_devvp->v_specmountpoint = NULL;
ntmp->ntm_devvp->v_rdev->si_mountpoint = NULL;
vinvalbuf(ntmp->ntm_devvp, V_SAVE, NOCRED, p, 0, 0);

View File

@ -173,15 +173,15 @@ spec_open(ap)
/*
* Never allow opens for write if the device is mounted R/W
*/
if (vp->v_specmountpoint != NULL &&
!(vp->v_specmountpoint->mnt_flag & MNT_RDONLY))
if (vp->v_rdev->si_mountpoint != NULL &&
!(vp->v_rdev->si_mountpoint->mnt_flag & MNT_RDONLY))
return (EBUSY);
/*
* When running in secure mode, do not allow opens
* for writing if the device is mounted
*/
if (securelevel >= 1 && vp->v_specmountpoint != NULL)
if (securelevel >= 1 && vfs_mountedon(vp))
return (EPERM);
/*
@ -435,7 +435,7 @@ spec_strategy(ap)
* Collect statistics on synchronous and asynchronous read
* and write counts for disks that have associated filesystems.
*/
if (vn_isdisk(vp, NULL) && (mp = vp->v_specmountpoint) != NULL) {
if (vn_isdisk(vp, NULL) && (mp = vp->v_rdev->si_mountpoint) != NULL) {
if (bp->b_iocmd == BIO_WRITE) {
if (bp->b_lock.lk_lockholder == LK_KERNPROC)
mp->mnt_stat.f_asyncwrites++;
@ -656,7 +656,7 @@ spec_getpages(ap)
* the device. i.e. it's usually '/dev'. We need the physical block
* size for the device itself.
*
* We can't use v_specmountpoint because it only exists when the
* We can't use v_rdev->si_mountpoint because it only exists when the
* block device is mounted. However, we can use v_rdev.
*/

View File

@ -727,7 +727,7 @@ ext2_mountfs(devvp, mp, p)
ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs);
for (i = 0; i < MAXQUOTAS; i++)
ump->um_quotas[i] = NULLVP;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
if (ronly == 0)
ext2_sbupdate(ump, MNT_WAIT);
return (0);
@ -788,7 +788,7 @@ ext2_unmount(mp, mntflags, p)
if (fs->s_block_bitmap[i])
ULCK_BUF(fs->s_block_bitmap[i])
ump->um_devvp->v_specmountpoint = NULL;
ump->um_devvp->v_rdev->si_mountpoint = NULL;
error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE,
NOCRED, p);
vrele(ump->um_devvp);

View File

@ -727,7 +727,7 @@ ext2_mountfs(devvp, mp, p)
ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs);
for (i = 0; i < MAXQUOTAS; i++)
ump->um_quotas[i] = NULLVP;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
if (ronly == 0)
ext2_sbupdate(ump, MNT_WAIT);
return (0);
@ -788,7 +788,7 @@ ext2_unmount(mp, mntflags, p)
if (fs->s_block_bitmap[i])
ULCK_BUF(fs->s_block_bitmap[i])
ump->um_devvp->v_specmountpoint = NULL;
ump->um_devvp->v_rdev->si_mountpoint = NULL;
error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE,
NOCRED, p);
vrele(ump->um_devvp);

View File

@ -438,7 +438,7 @@ iso_mountfs(devvp, mp, p, argp)
isomp->im_dev = dev;
isomp->im_devvp = devvp;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
/* Check the Rock Ridge Extention support */
if (!(argp->flags & ISOFSMNT_NORRIP)) {
@ -505,7 +505,7 @@ iso_mountfs(devvp, mp, p, argp)
return 0;
out:
devvp->v_specmountpoint = NULL;
devvp->v_rdev->si_mountpoint = NULL;
if (bp)
brelse(bp);
if (pribp)
@ -545,7 +545,7 @@ cd9660_unmount(mp, mntflags, p)
isomp = VFSTOISOFS(mp);
isomp->im_devvp->v_specmountpoint = NULL;
isomp->im_devvp->v_rdev->si_mountpoint = NULL;
error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
vrele(isomp->im_devvp);
free((caddr_t)isomp, M_ISOFSMNT);

View File

@ -1235,7 +1235,7 @@ reassignbuf(bp, newvp)
break;
case VCHR:
case VBLK:
if (newvp->v_specmountpoint != NULL) {
if (newvp->v_rdev->si_mountpoint != NULL) {
delay = metadelay;
break;
}
@ -2251,7 +2251,7 @@ vfs_mountedon(vp)
struct vnode *vp;
{
if (vp->v_specmountpoint != NULL)
if (vp->v_rdev->si_mountpoint != NULL)
return (EBUSY);
return (0);
}

View File

@ -1235,7 +1235,7 @@ reassignbuf(bp, newvp)
break;
case VCHR:
case VBLK:
if (newvp->v_specmountpoint != NULL) {
if (newvp->v_rdev->si_mountpoint != NULL) {
delay = metadelay;
break;
}
@ -2251,7 +2251,7 @@ vfs_mountedon(vp)
struct vnode *vp;
{
if (vp->v_specmountpoint != NULL)
if (vp->v_rdev->si_mountpoint != NULL)
return (EBUSY);
return (0);
}

View File

@ -173,15 +173,15 @@ spec_open(ap)
/*
* Never allow opens for write if the device is mounted R/W
*/
if (vp->v_specmountpoint != NULL &&
!(vp->v_specmountpoint->mnt_flag & MNT_RDONLY))
if (vp->v_rdev->si_mountpoint != NULL &&
!(vp->v_rdev->si_mountpoint->mnt_flag & MNT_RDONLY))
return (EBUSY);
/*
* When running in secure mode, do not allow opens
* for writing if the device is mounted
*/
if (securelevel >= 1 && vp->v_specmountpoint != NULL)
if (securelevel >= 1 && vfs_mountedon(vp))
return (EPERM);
/*
@ -435,7 +435,7 @@ spec_strategy(ap)
* Collect statistics on synchronous and asynchronous read
* and write counts for disks that have associated filesystems.
*/
if (vn_isdisk(vp, NULL) && (mp = vp->v_specmountpoint) != NULL) {
if (vn_isdisk(vp, NULL) && (mp = vp->v_rdev->si_mountpoint) != NULL) {
if (bp->b_iocmd == BIO_WRITE) {
if (bp->b_lock.lk_lockholder == LK_KERNPROC)
mp->mnt_stat.f_asyncwrites++;
@ -656,7 +656,7 @@ spec_getpages(ap)
* the device. i.e. it's usually '/dev'. We need the physical block
* size for the device itself.
*
* We can't use v_specmountpoint because it only exists when the
* We can't use v_rdev->si_mountpoint because it only exists when the
* block device is mounted. However, we can use v_rdev.
*/

View File

@ -725,7 +725,7 @@ mountmsdosfs(devvp, mp, p, argp)
mp->mnt_stat.f_fsid.val[0] = dev2udev(dev);
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
mp->mnt_flag |= MNT_LOCAL;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
return 0;
@ -761,7 +761,7 @@ msdosfs_unmount(mp, mntflags, p)
if (error)
return error;
pmp = VFSTOMSDOSFS(mp);
pmp->pm_devvp->v_specmountpoint = NULL;
pmp->pm_devvp->v_rdev->si_mountpoint = NULL;
#ifdef MSDOSFS_DEBUG
{
struct vnode *vp = pmp->pm_devvp;

View File

@ -605,7 +605,7 @@ ntfs_mountfs(devvp, mp, argsp, p)
#endif
mp->mnt_maxsymlinklen = 0;
mp->mnt_flag |= MNT_LOCAL;
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
return (0);
out1:
@ -616,7 +616,7 @@ ntfs_mountfs(devvp, mp, argsp, p)
dprintf(("ntfs_mountfs: vflush failed\n"));
out:
devvp->v_specmountpoint = NULL;
devvp->v_rdev->si_mountpoint = NULL;
if (bp)
brelse(bp);
@ -685,7 +685,7 @@ ntfs_unmount(
* field is NULL and touching it causes null pointer derefercence.
*/
if (ntmp->ntm_devvp->v_type != VBAD)
ntmp->ntm_devvp->v_specmountpoint = NULL;
ntmp->ntm_devvp->v_rdev->si_mountpoint = NULL;
vinvalbuf(ntmp->ntm_devvp, V_SAVE, NOCRED, p, 0, 0);

View File

@ -91,11 +91,6 @@ struct specinfo {
#define si_bsize_phys __si_u.__si_disk.__sid_bsize_phys
#define si_bsize_best __si_u.__si_disk.__sid_bsize_best
/*
* Exported shorthand
*/
#define v_specmountpoint v_rdev->si_mountpoint
/*
* Special device management
*/

View File

@ -91,11 +91,6 @@ struct specinfo {
#define si_bsize_phys __si_u.__si_disk.__sid_bsize_phys
#define si_bsize_best __si_u.__si_disk.__sid_bsize_best
/*
* Exported shorthand
*/
#define v_specmountpoint v_rdev->si_mountpoint
/*
* Special device management
*/

View File

@ -3890,8 +3890,8 @@ softdep_sync_metadata(ap)
if (!DOINGSOFTDEP(vp))
return (0);
} else
if (vp->v_specmountpoint == NULL ||
(vp->v_specmountpoint->mnt_flag & MNT_SOFTDEP) == 0)
if (vp->v_rdev->si_mountpoint == NULL ||
(vp->v_rdev->si_mountpoint->mnt_flag & MNT_SOFTDEP) == 0)
return (0);
/*
* Ensure that any direct block dependencies have been cleared.
@ -4112,8 +4112,8 @@ softdep_sync_metadata(ap)
* this happens rarely).
*/
if (vn_isdisk(vp, NULL) &&
vp->v_specmountpoint && !VOP_ISLOCKED(vp, NULL) &&
(error = VFS_SYNC(vp->v_specmountpoint, MNT_WAIT, ap->a_cred,
vp->v_rdev->si_mountpoint && !VOP_ISLOCKED(vp, NULL) &&
(error = VFS_SYNC(vp->v_rdev->si_mountpoint, MNT_WAIT, ap->a_cred,
ap->a_p)) != 0)
return (error);
return (0);

View File

@ -666,7 +666,7 @@ ffs_mountfs(devvp, mp, p, malloctype)
#ifdef FFS_EXTATTR
ufs_extattr_uepm_init(&ump->um_extattr);
#endif
devvp->v_specmountpoint = mp;
devvp->v_rdev->si_mountpoint = mp;
ffs_oldfscompat(fs);
/*
@ -719,7 +719,7 @@ ffs_mountfs(devvp, mp, p, malloctype)
#endif
return (0);
out:
devvp->v_specmountpoint = NULL;
devvp->v_rdev->si_mountpoint = NULL;
if (bp)
brelse(bp);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);
@ -803,7 +803,7 @@ ffs_unmount(mp, mntflags, p)
return (error);
}
}
ump->um_devvp->v_specmountpoint = NULL;
ump->um_devvp->v_rdev->si_mountpoint = NULL;
vinvalbuf(ump->um_devvp, V_SAVE, NOCRED, p, 0, 0);
error = VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE,

View File

@ -155,8 +155,8 @@ ffs_fsync(ap)
wait = (ap->a_waitfor == MNT_WAIT);
if (vn_isdisk(vp, NULL)) {
lbn = INT_MAX;
if (vp->v_specmountpoint != NULL &&
(vp->v_specmountpoint->mnt_flag & MNT_SOFTDEP))
if (vp->v_rdev->si_mountpoint != NULL &&
(vp->v_rdev->si_mountpoint->mnt_flag & MNT_SOFTDEP))
softdep_fsync_mountdev(vp);
} else {
lbn = lblkno(ip->i_fs, (ip->i_size + ip->i_fs->fs_bsize - 1));