diff options
author | eivind <eivind@FreeBSD.org> | 2000-10-09 17:31:39 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 2000-10-09 17:31:39 +0000 |
commit | 4a39f454a004e45fbf58edf33d5a7c897964fa2d (patch) | |
tree | 1dc4af23aa65164f631bbeb9f969739d5f05803b | |
parent | 21413d77fe0420111b362ba10c8108c1a22ee2b7 (diff) | |
download | FreeBSD-src-4a39f454a004e45fbf58edf33d5a7c897964fa2d.zip FreeBSD-src-4a39f454a004e45fbf58edf33d5a7c897964fa2d.tar.gz |
Blow away the v_specmountpoint define, replacing it with what it was
defined as (rdev->si_mountpoint)
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/hpfs/hpfs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 10 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 4 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 4 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_export.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 4 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 10 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/ntfs/ntfs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/sys/conf.h | 5 | ||||
-rw-r--r-- | sys/sys/linedisc.h | 5 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 8 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 4 |
18 files changed, 46 insertions, 56 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 0934730..49e6169 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -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); diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index 1906799..a5be4d8 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -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 @@ failed: 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 diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 8af88d4..823eb36 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -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; diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index 1b0b97a..b520eb8 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -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 @@ out1: 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); diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index f681cc8..ae8e11a 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -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. */ diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 5cc49e0..bd77f0a 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -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); diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 5cc49e0..bd77f0a 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -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); diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 0934730..49e6169 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -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); diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index c37397a..eb5f5cf 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -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); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c37397a..eb5f5cf 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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); } diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index f681cc8..ae8e11a 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -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. */ diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c index 8af88d4..823eb36 100644 --- a/sys/msdosfs/msdosfs_vfsops.c +++ b/sys/msdosfs/msdosfs_vfsops.c @@ -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; diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index 1b0b97a..b520eb8 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -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 @@ out1: 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); diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 8c0a7d1..2a8b20e 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -92,11 +92,6 @@ struct specinfo { #define si_bsize_best __si_u.__si_disk.__sid_bsize_best /* - * Exported shorthand - */ -#define v_specmountpoint v_rdev->si_mountpoint - -/* * Special device management */ #define SPECHSZ 64 diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h index 8c0a7d1..2a8b20e 100644 --- a/sys/sys/linedisc.h +++ b/sys/sys/linedisc.h @@ -92,11 +92,6 @@ struct specinfo { #define si_bsize_best __si_u.__si_disk.__sid_bsize_best /* - * Exported shorthand - */ -#define v_specmountpoint v_rdev->si_mountpoint - -/* * Special device management */ #define SPECHSZ 64 diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 1668fa1..a1525dc 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -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 @@ loop: * 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); diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 41e0786..80610a3 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -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, diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index b29ee54..b9a83f5 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -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)); |