diff options
author | kib <kib@FreeBSD.org> | 2015-06-05 08:36:25 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-06-05 08:36:25 +0000 |
commit | 8adebdc1fb2155471d30ae8e1658f04043f30091 (patch) | |
tree | ac0fd4ac26d5483f8db92a69e2f3069d09468c6a /sys/ufs | |
parent | 0a8cb339c3fc968720a3a61ef4613d05badcabb9 (diff) | |
download | FreeBSD-src-8adebdc1fb2155471d30ae8e1658f04043f30091.zip FreeBSD-src-8adebdc1fb2155471d30ae8e1658f04043f30091.tar.gz |
MFC r283735:
Remove several write-only variables.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_suspend.c | 2 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 10 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 14 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_bmap.c | 2 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_dirhash.c | 4 |
6 files changed, 2 insertions, 36 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 2ce5cac..289bab0 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -4692,12 +4692,10 @@ softdep_setup_dotdot_link(dp, ip) struct inodedep *inodedep; struct jaddref *jaddref; struct vnode *dvp; - struct vnode *vp; KASSERT(MOUNTEDSOFTDEP(UFSTOVFS(dp->i_ump)) != 0, ("softdep_setup_dotdot_link called on non-softdep filesystem")); dvp = ITOV(dp); - vp = ITOV(ip); jaddref = NULL; /* * We don't set MKDIR_PARENT as this is not tied to a mkdir and @@ -7066,7 +7064,6 @@ trunc_dependencies(ip, freeblks, lastlbn, lastoff, flags) struct bufobj *bo; struct vnode *vp; struct buf *bp; - struct fs *fs; int blkoff; /* @@ -7075,7 +7072,6 @@ trunc_dependencies(ip, freeblks, lastlbn, lastoff, flags) * Once they are all there, walk the list and get rid of * any dependencies. */ - fs = ip->i_fs; vp = ITOV(ip); bo = &vp->v_bufobj; BO_LOCK(bo); @@ -9511,12 +9507,10 @@ handle_written_sbdep(sbdep, bp) struct buf *bp; { struct inodedep *inodedep; - struct mount *mp; struct fs *fs; LOCK_OWNED(sbdep->sb_ump); fs = sbdep->sb_fs; - mp = UFSTOVFS(sbdep->sb_ump); /* * If the superblock doesn't match the in-memory list start over. */ diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c index a8c4578..5baf460 100644 --- a/sys/ufs/ffs/ffs_suspend.c +++ b/sys/ufs/ffs/ffs_suspend.c @@ -176,7 +176,6 @@ out: static int ffs_susp_suspend(struct mount *mp) { - struct fs *fs; struct ufsmount *ump; int error; @@ -188,7 +187,6 @@ ffs_susp_suspend(struct mount *mp) return (EBUSY); ump = VFSTOUFS(mp); - fs = ump->um_fs; /* * Make sure the calling thread is permitted to access the mounted diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index a7ed993..0bcb084 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1485,7 +1485,7 @@ ffs_sync(mp, waitfor) struct inode *ip; struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs; - int error, count, wait, lockreq, allerror = 0; + int error, count, lockreq, allerror = 0; int suspend; int suspended; int secondary_writes; @@ -1494,7 +1494,6 @@ ffs_sync(mp, waitfor) int softdep_accdeps; struct bufobj *bo; - wait = 0; suspend = 0; suspended = 0; td = curthread; @@ -1516,10 +1515,8 @@ ffs_sync(mp, waitfor) suspend = 1; waitfor = MNT_WAIT; } - if (waitfor == MNT_WAIT) { - wait = 1; + if (waitfor == MNT_WAIT) lockreq = LK_EXCLUSIVE; - } lockreq |= LK_INTERLOCK | LK_SLEEPFAIL; loop: /* Grab snapshot of secondary write counts */ @@ -2023,7 +2020,6 @@ static int ffs_bufwrite(struct buf *bp) { struct buf *newbp; - int oldflags; CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); if (bp->b_flags & B_INVAL) { @@ -2031,8 +2027,6 @@ ffs_bufwrite(struct buf *bp) return (0); } - oldflags = bp->b_flags; - if (!BUF_ISLOCKED(bp)) panic("bufwrite: buffer is not busy???"); /* diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index fc7d4f2..d87712e 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1407,11 +1407,6 @@ struct vop_openextattr_args { }; */ { - struct inode *ip; - struct fs *fs; - - ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1435,11 +1430,6 @@ struct vop_closeextattr_args { }; */ { - struct inode *ip; - struct fs *fs; - - ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1553,13 +1543,11 @@ vop_getextattr { */ { struct inode *ip; - struct fs *fs; u_char *eae, *p; unsigned easize; int error, ealen; ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); @@ -1608,14 +1596,12 @@ vop_listextattr { */ { struct inode *ip; - struct fs *fs; u_char *eae, *p, *pe, *pn; unsigned easize; uint32_t ul; int error, ealen; ip = VTOI(ap->a_vp); - fs = ip->i_fs; if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) return (EOPNOTSUPP); diff --git a/sys/ufs/ufs/ufs_bmap.c b/sys/ufs/ufs/ufs_bmap.c index 22887c8..9819ef5 100644 --- a/sys/ufs/ufs/ufs_bmap.c +++ b/sys/ufs/ufs/ufs_bmap.c @@ -114,7 +114,6 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb) struct buf *bp; struct ufsmount *ump; struct mount *mp; - struct vnode *devvp; struct indir a[NIADDR+1], *ap; ufs2_daddr_t daddr; ufs_lbn_t metalbn; @@ -125,7 +124,6 @@ ufs_bmaparray(vp, bn, bnp, nbp, runp, runb) ip = VTOI(vp); mp = vp->v_mount; ump = VFSTOUFS(mp); - devvp = ump->um_devvp; if (runp) { maxrun = mp->mnt_iosize_max / mp->mnt_stat.f_iosize - 1; diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c index 5c29923..0790189 100644 --- a/sys/ufs/ufs/ufs_dirhash.c +++ b/sys/ufs/ufs/ufs_dirhash.c @@ -189,9 +189,7 @@ ufsdirhash_create(struct inode *ip) struct dirhash *ndh; struct dirhash *dh; struct vnode *vp; - int error; - error = 0; ndh = dh = NULL; vp = ip->i_vnode; for (;;) { @@ -273,11 +271,9 @@ static struct dirhash * ufsdirhash_acquire(struct inode *ip) { struct dirhash *dh; - struct vnode *vp; ASSERT_VOP_ELOCKED(ip->i_vnode, __FUNCTION__); - vp = ip->i_vnode; dh = ip->i_dirhash; if (dh == NULL) return (NULL); |