summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2012-04-23 13:21:28 +0000
committertrasz <trasz@FreeBSD.org>2012-04-23 13:21:28 +0000
commitbaac623cd9f021cfdf826109aecab017d5cae570 (patch)
tree73236257e630df705375e3aea0f8003fa2a9eb67 /sys/ufs
parent2e83ed7d1307db3a45a6e36835ccaf391564892f (diff)
downloadFreeBSD-src-baac623cd9f021cfdf826109aecab017d5cae570.zip
FreeBSD-src-baac623cd9f021cfdf826109aecab017d5cae570.tar.gz
Remove unused thread argument from vtruncbuf().
Reviewed by: kib
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_extern.h2
-rw-r--r--sys/ufs/ffs/ffs_inode.c5
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c4
-rw-r--r--sys/ufs/ffs/ffs_vnops.c7
-rw-r--r--sys/ufs/ufs/ufs_inode.c3
-rw-r--r--sys/ufs/ufs/ufs_lookup.c2
-rw-r--r--sys/ufs/ufs/ufs_vnops.c5
-rw-r--r--sys/ufs/ufs/ufsmount.h4
8 files changed, 14 insertions, 18 deletions
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index bb37571..4db351d 100644
--- a/sys/ufs/ffs/ffs_extern.h
+++ b/sys/ufs/ffs/ffs_extern.h
@@ -93,7 +93,7 @@ void ffs_snapshot_unmount(struct mount *mp);
void process_deferred_inactive(struct mount *mp);
void ffs_sync_snap(struct mount *, int);
int ffs_syncvnode(struct vnode *vp, int waitfor, int flags);
-int ffs_truncate(struct vnode *, off_t, int, struct ucred *, struct thread *);
+int ffs_truncate(struct vnode *, off_t, int, struct ucred *);
int ffs_update(struct vnode *, int);
int ffs_valloc(struct vnode *, int, struct ucred *, struct vnode **);
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index 6175ed8..f8584d5 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -170,12 +170,11 @@ loop:
* disk blocks.
*/
int
-ffs_truncate(vp, length, flags, cred, td)
+ffs_truncate(vp, length, flags, cred)
struct vnode *vp;
off_t length;
int flags;
struct ucred *cred;
- struct thread *td;
{
struct inode *ip;
ufs2_daddr_t bn, lbn, lastblock, lastiblock[NIADDR], indir_lbn[NIADDR];
@@ -449,7 +448,7 @@ ffs_truncate(vp, length, flags, cred, td)
ip->i_size = osize;
DIP_SET(ip, i_size, osize);
- error = vtruncbuf(vp, cred, td, length, fs->fs_bsize);
+ error = vtruncbuf(vp, cred, length, fs->fs_bsize);
if (error && (allerror == 0))
allerror = error;
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index c7449f0..9d03f03 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -850,7 +850,7 @@ out:
mp->mnt_flag = (mp->mnt_flag & MNT_QUOTA) | (flag & ~MNT_QUOTA);
MNT_IUNLOCK(mp);
if (error)
- (void) ffs_truncate(vp, (off_t)0, 0, NOCRED, td);
+ (void) ffs_truncate(vp, (off_t)0, 0, NOCRED);
(void) ffs_syncvnode(vp, MNT_WAIT, 0);
if (error)
vput(vp);
@@ -1989,7 +1989,7 @@ ffs_snapshot_mount(mp)
reason = "non-snapshot";
} else {
reason = "old format snapshot";
- (void)ffs_truncate(vp, (off_t)0, 0, NOCRED, td);
+ (void)ffs_truncate(vp, (off_t)0, 0, NOCRED);
(void)ffs_syncvnode(vp, MNT_WAIT, 0);
}
printf("ffs_snapshot_mount: %s inode %d\n",
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 4452991..0699eef 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -812,8 +812,7 @@ ffs_write(ap)
if (error) {
if (ioflag & IO_UNIT) {
(void)ffs_truncate(vp, osize,
- IO_NORMAL | (ioflag & IO_SYNC),
- ap->a_cred, uio->uio_td);
+ IO_NORMAL | (ioflag & IO_SYNC), ap->a_cred);
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
}
@@ -1135,7 +1134,7 @@ ffs_extwrite(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *ucred)
if (error) {
if (ioflag & IO_UNIT) {
(void)ffs_truncate(vp, osize,
- IO_EXT | (ioflag&IO_SYNC), ucred, uio->uio_td);
+ IO_EXT | (ioflag&IO_SYNC), ucred);
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
}
@@ -1326,7 +1325,7 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td
luio.uio_td = td;
/* XXX: I'm not happy about truncating to zero size */
if (ip->i_ea_len < dp->di_extsize)
- error = ffs_truncate(vp, 0, IO_EXT, cred, td);
+ error = ffs_truncate(vp, 0, IO_EXT, cred);
error = ffs_extwrite(vp, &luio, IO_EXT | IO_SYNC, cred);
}
if (--ip->i_ea_refs == 0) {
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index 3acc5c8..bf4e2cb 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -129,8 +129,7 @@ ufs_inactive(ap)
if (ip->i_ump->um_fstype == UFS2)
isize += ip->i_din2->di_extsize;
if (ip->i_effnlink <= 0 && isize && !UFS_RDONLY(ip))
- error = UFS_TRUNCATE(vp, (off_t)0, IO_EXT | IO_NORMAL,
- NOCRED, td);
+ error = UFS_TRUNCATE(vp, (off_t)0, IO_EXT | IO_NORMAL, NOCRED);
if (ip->i_nlink <= 0 && ip->i_mode && !UFS_RDONLY(ip)) {
#ifdef QUOTA
if (!getinoquota(ip))
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c
index 56ca058..bcbda6e 100644
--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -1133,7 +1133,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename)
ufsdirhash_dirtrunc(dp, dp->i_endoff);
#endif
(void) UFS_TRUNCATE(dvp, (off_t)dp->i_endoff,
- IO_NORMAL | IO_SYNC, cr, td);
+ IO_NORMAL | IO_SYNC, cr);
if (tvp != NULL)
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
}
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 64fe3e4..f55b515 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -621,7 +621,7 @@ ufs_setattr(ap)
return (0);
}
if ((error = UFS_TRUNCATE(vp, vap->va_size, IO_NORMAL,
- cred, td)) != 0)
+ cred)) != 0)
return (error);
}
if (vap->va_atime.tv_sec != VNOVAL ||
@@ -1567,8 +1567,7 @@ unlockout:
if (tdp->i_dirhash != NULL)
ufsdirhash_dirtrunc(tdp, endoff);
#endif
- UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred,
- td);
+ UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred);
}
if (error == 0 && tdp->i_flag & IN_NEEDSYNC)
error = VOP_FSYNC(tdvp, MNT_WAIT, td);
diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h
index 6447dce..86a6d14 100644
--- a/sys/ufs/ufs/ufsmount.h
+++ b/sys/ufs/ufs/ufsmount.h
@@ -100,7 +100,7 @@ struct ufsmount {
int um_candelete; /* devvp supports TRIM */
int (*um_balloc)(struct vnode *, off_t, int, struct ucred *, int, struct buf **);
int (*um_blkatoff)(struct vnode *, off_t, char **, struct buf **);
- int (*um_truncate)(struct vnode *, off_t, int, struct ucred *, struct thread *);
+ int (*um_truncate)(struct vnode *, off_t, int, struct ucred *);
int (*um_update)(struct vnode *, int);
int (*um_valloc)(struct vnode *, int, struct ucred *, struct vnode **);
int (*um_vfree)(struct vnode *, ino_t, int);
@@ -111,7 +111,7 @@ struct ufsmount {
#define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff)
#define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd)
-#define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee)
+#define UFS_TRUNCATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd)
#define UFS_UPDATE(aa, bb) VFSTOUFS((aa)->v_mount)->um_update(aa, bb)
#define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd)
#define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc)
OpenPOWER on IntegriCloud