summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-10-10 21:23:50 +0000
committerattilio <attilio@FreeBSD.org>2008-10-10 21:23:50 +0000
commitb8bf37e5857b138031059dd4768deb4937efe183 (patch)
treefd8b76b514f556d4aec4cdd5d6fd55919f6e33ab
parent7ce828dea0b330b67ef23488dde94b994adcdcfc (diff)
downloadFreeBSD-src-b8bf37e5857b138031059dd4768deb4937efe183.zip
FreeBSD-src-b8bf37e5857b138031059dd4768deb4937efe183.tar.gz
Remove the struct thread unuseful argument from bufobj interface.
In particular following functions KPI results modified: - bufobj_invalbuf() - bufsync() and BO_SYNC() "virtual method" of the buffer objects set. Main consumers of bufobj functions are affected by this change too and, in particular, functions which changed their KPI are: - vinvalbuf() - g_vfs_close() Due to the KPI breakage, __FreeBSD_version will be bumped in a later commit. As a side note, please consider just temporary the 'curthread' argument passing to VOP_SYNC() (in bufsync()) as it will be axed out ASAP Reviewed by: kib Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c2
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c14
-rw-r--r--sys/fs/hpfs/hpfs_vfsops.c6
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c11
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c6
-rw-r--r--sys/fs/nwfs/nwfs_io.c4
-rw-r--r--sys/fs/smbfs/smbfs_io.c4
-rw-r--r--sys/fs/udf/udf_vfsops.c12
-rw-r--r--sys/geom/geom_vfs.c4
-rw-r--r--sys/geom/geom_vfs.h2
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c17
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_buf.c2
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c9
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_super.c2
-rw-r--r--sys/kern/vfs_bio.c4
-rw-r--r--sys/kern/vfs_mount.c4
-rw-r--r--sys/kern/vfs_subr.c14
-rw-r--r--sys/nfsclient/nfs_bio.c4
-rw-r--r--sys/sys/bufobj.h9
-rw-r--r--sys/sys/vnode.h3
-rw-r--r--sys/ufs/ffs/ffs_inode.c4
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c8
-rw-r--r--sys/vm/vm_object.c2
23 files changed, 70 insertions, 77 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
index bab8496..a964ec2 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
@@ -916,7 +916,7 @@ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
#if 0
error = vtruncbuf(vp, curthread->td_ucred, curthread, end, PAGE_SIZE);
#else
- error = vinvalbuf(vp, V_SAVE, curthread, 0, 0);
+ error = vinvalbuf(vp, V_SAVE, 0, 0);
vnode_pager_setsize(vp, end);
#endif
}
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index 41502d1..f4ff62d 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -88,8 +88,7 @@ static struct vfsops cd9660_vfsops = {
VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY);
MODULE_VERSION(cd9660, 1);
-static int iso_mountfs(struct vnode *devvp, struct mount *mp,
- struct thread *td);
+static int iso_mountfs(struct vnode *devvp, struct mount *mp);
/*
* VFS Operations.
@@ -181,7 +180,7 @@ cd9660_mount(struct mount *mp, struct thread *td)
VOP_UNLOCK(devvp, 0);
if ((mp->mnt_flag & MNT_UPDATE) == 0) {
- error = iso_mountfs(devvp, mp, td);
+ error = iso_mountfs(devvp, mp);
} else {
if (devvp != imp->im_devvp)
error = EINVAL; /* needs translation */
@@ -200,10 +199,9 @@ cd9660_mount(struct mount *mp, struct thread *td)
* Common code for mount and mountroot
*/
static int
-iso_mountfs(devvp, mp, td)
+iso_mountfs(devvp, mp)
struct vnode *devvp;
struct mount *mp;
- struct thread *td;
{
struct iso_mnt *isomp = (struct iso_mnt *)0;
struct buf *bp = NULL;
@@ -249,7 +247,7 @@ iso_mountfs(devvp, mp, td)
if ((ISO_DEFAULT_BLOCK_SIZE % cp->provider->sectorsize) != 0) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
return (EINVAL);
@@ -482,7 +480,7 @@ out:
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
}
@@ -525,7 +523,7 @@ cd9660_unmount(mp, mntflags, td)
}
DROP_GIANT();
g_topology_lock();
- g_vfs_close(isomp->im_cp, td);
+ g_vfs_close(isomp->im_cp);
g_topology_unlock();
PICKUP_GIANT();
vrele(isomp->im_devvp);
diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c
index 7fbe56f..02b5ea4 100644
--- a/sys/fs/hpfs/hpfs_vfsops.c
+++ b/sys/fs/hpfs/hpfs_vfsops.c
@@ -325,7 +325,7 @@ failed:
mp->mnt_data = NULL;
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
return (error);
@@ -356,10 +356,10 @@ hpfs_unmount(
return (error);
}
- vinvalbuf(hpmp->hpm_devvp, V_SAVE, td, 0, 0);
+ vinvalbuf(hpmp->hpm_devvp, V_SAVE, 0, 0);
DROP_GIANT();
g_topology_lock();
- g_vfs_close(hpmp->hpm_cp, td);
+ g_vfs_close(hpmp->hpm_cp);
g_topology_unlock();
PICKUP_GIANT();
vrele(hpmp->hpm_devvp);
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index e2525b2..8991e18 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -103,8 +103,7 @@ static MALLOC_DEFINE(M_MSDOSFSFAT, "msdosfs_fat", "MSDOSFS file allocation table
struct iconv_functions *msdosfs_iconv;
static int update_mp(struct mount *mp, struct thread *td);
-static int mountmsdosfs(struct vnode *devvp, struct mount *mp,
- struct thread *td);
+static int mountmsdosfs(struct vnode *devvp, struct mount *mp);
static vfs_fhtovp_t msdosfs_fhtovp;
static vfs_mount_t msdosfs_mount;
static vfs_root_t msdosfs_root;
@@ -375,7 +374,7 @@ msdosfs_mount(struct mount *mp, struct thread *td)
return (error);
}
if ((mp->mnt_flag & MNT_UPDATE) == 0) {
- error = mountmsdosfs(devvp, mp, td);
+ error = mountmsdosfs(devvp, mp);
#ifdef MSDOSFS_DEBUG /* only needed for the printf below */
pmp = VFSTOMSDOSFS(mp);
#endif
@@ -405,7 +404,7 @@ msdosfs_mount(struct mount *mp, struct thread *td)
}
static int
-mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td)
+mountmsdosfs(struct vnode *devvp, struct mount *mp)
{
struct msdosfsmount *pmp;
struct buf *bp;
@@ -754,7 +753,7 @@ error_exit:
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
}
@@ -824,7 +823,7 @@ msdosfs_unmount(struct mount *mp, int mntflags, struct thread *td)
#endif
DROP_GIANT();
g_topology_lock();
- g_vfs_close(pmp->pm_cp, td);
+ g_vfs_close(pmp->pm_cp);
g_topology_unlock();
PICKUP_GIANT();
vrele(pmp->pm_devvp);
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index e79072d..86ff17a 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -462,7 +462,7 @@ out:
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
@@ -506,11 +506,11 @@ ntfs_unmount(
if (error)
printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error);
- vinvalbuf(ntmp->ntm_devvp, V_SAVE, td, 0, 0);
+ vinvalbuf(ntmp->ntm_devvp, V_SAVE, 0, 0);
DROP_GIANT();
g_topology_lock();
- g_vfs_close(ntmp->ntm_cp, td);
+ g_vfs_close(ntmp->ntm_cp);
g_topology_unlock();
PICKUP_GIANT();
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c
index 3ded52d..e45c2ad 100644
--- a/sys/fs/nwfs/nwfs_io.c
+++ b/sys/fs/nwfs/nwfs_io.c
@@ -618,7 +618,7 @@ nwfs_vinvalbuf(vp, td)
VM_OBJECT_UNLOCK(vp->v_bufobj.bo_object);
}
- error = vinvalbuf(vp, V_SAVE, td, PCATCH, 0);
+ error = vinvalbuf(vp, V_SAVE, PCATCH, 0);
while (error) {
if (error == ERESTART || error == EINTR) {
np->n_flag &= ~NFLUSHINPROG;
@@ -628,7 +628,7 @@ nwfs_vinvalbuf(vp, td)
}
return EINTR;
}
- error = vinvalbuf(vp, V_SAVE, td, PCATCH, 0);
+ error = vinvalbuf(vp, V_SAVE, PCATCH, 0);
}
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
if (np->n_flag & NFLUSHWANT) {
diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c
index 5fbbc61..2944a6b 100644
--- a/sys/fs/smbfs/smbfs_io.c
+++ b/sys/fs/smbfs/smbfs_io.c
@@ -690,7 +690,7 @@ smbfs_vinvalbuf(struct vnode *vp, struct thread *td)
VM_OBJECT_UNLOCK(vp->v_bufobj.bo_object);
}
- error = vinvalbuf(vp, V_SAVE, td, PCATCH, 0);
+ error = vinvalbuf(vp, V_SAVE, PCATCH, 0);
while (error) {
if (error == ERESTART || error == EINTR) {
np->n_flag &= ~NFLUSHINPROG;
@@ -700,7 +700,7 @@ smbfs_vinvalbuf(struct vnode *vp, struct thread *td)
}
return EINTR;
}
- error = vinvalbuf(vp, V_SAVE, td, PCATCH, 0);
+ error = vinvalbuf(vp, V_SAVE, PCATCH, 0);
}
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
if (np->n_flag & NFLUSHWANT) {
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index 7485991..6c0d7d0 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -134,7 +134,7 @@ VFS_SET(udf_vfsops, udf, VFCF_READONLY);
MODULE_VERSION(udf, 1);
-static int udf_mountfs(struct vnode *, struct mount *, struct thread *);
+static int udf_mountfs(struct vnode *, struct mount *);
static int
udf_init(struct vfsconf *foo)
@@ -243,7 +243,7 @@ udf_mount(struct mount *mp, struct thread *td)
return (error);
}
- if ((error = udf_mountfs(devvp, mp, td))) {
+ if ((error = udf_mountfs(devvp, mp))) {
vrele(devvp);
return (error);
}
@@ -301,7 +301,7 @@ udf_checktag(struct desc_tag *tag, uint16_t id)
}
static int
-udf_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) {
+udf_mountfs(struct vnode *devvp, struct mount *mp) {
struct buf *bp = NULL;
struct anchor_vdp avdp;
struct udf_mnt *udfmp = NULL;
@@ -365,7 +365,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) {
(logical_secsize < cp->provider->sectorsize)) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
return (EINVAL);
@@ -493,7 +493,7 @@ bail:
brelse(bp);
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
return error;
@@ -524,7 +524,7 @@ udf_unmount(struct mount *mp, int mntflags, struct thread *td)
DROP_GIANT();
g_topology_lock();
- g_vfs_close(udfmp->im_cp, td);
+ g_vfs_close(udfmp->im_cp);
g_topology_unlock();
PICKUP_GIANT();
vrele(udfmp->im_devvp);
diff --git a/sys/geom/geom_vfs.c b/sys/geom/geom_vfs.c
index 4a33d22..0621eff 100644
--- a/sys/geom/geom_vfs.c
+++ b/sys/geom/geom_vfs.c
@@ -163,7 +163,7 @@ g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr
}
void
-g_vfs_close(struct g_consumer *cp, struct thread *td)
+g_vfs_close(struct g_consumer *cp)
{
struct g_geom *gp;
struct bufobj *bo;
@@ -172,6 +172,6 @@ g_vfs_close(struct g_consumer *cp, struct thread *td)
gp = cp->geom;
bo = gp->softc;
- bufobj_invalbuf(bo, V_SAVE, td, 0, 0);
+ bufobj_invalbuf(bo, V_SAVE, 0, 0);
g_wither_geom_close(gp, ENXIO);
}
diff --git a/sys/geom/geom_vfs.h b/sys/geom/geom_vfs.h
index 806ec1c..8accf35 100644
--- a/sys/geom/geom_vfs.h
+++ b/sys/geom/geom_vfs.h
@@ -37,6 +37,6 @@ extern struct buf_ops *g_vfs_bufops;
void g_vfs_strategy(struct bufobj *bo, struct buf *bp);
int g_vfs_open(struct vnode *vp, struct g_consumer **cpp, const char *fsname, int wr);
-void g_vfs_close(struct g_consumer *cp, struct thread *td);
+void g_vfs_close(struct g_consumer *cp);
#endif /* _GEOM_GEOM_VFS_H_ */
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index ebcb476..b7f766c 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -82,7 +82,7 @@
#include <gnu/fs/ext2fs/ext2_fs_sb.h>
static int ext2_flushfiles(struct mount *mp, int flags, struct thread *td);
-static int ext2_mountfs(struct vnode *, struct mount *, struct thread *);
+static int ext2_mountfs(struct vnode *, struct mount *);
static int ext2_reload(struct mount *mp, struct thread *td);
static int ext2_sbupdate(struct ext2mount *, int);
@@ -277,7 +277,7 @@ ext2_mount(mp, td)
}
if ((mp->mnt_flag & MNT_UPDATE) == 0) {
- error = ext2_mountfs(devvp, mp, td);
+ error = ext2_mountfs(devvp, mp);
} else {
if (devvp != ump->um_devvp) {
vput(devvp);
@@ -518,7 +518,7 @@ ext2_reload(struct mount *mp, struct thread *td)
*/
devvp = VFSTOEXT2(mp)->um_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
- if (vinvalbuf(devvp, 0, td, 0, 0) != 0)
+ if (vinvalbuf(devvp, 0, 0, 0) != 0)
panic("ext2_reload: dirty1");
VOP_UNLOCK(devvp, 0);
@@ -562,7 +562,7 @@ loop:
MNT_VNODE_FOREACH_ABORT(mp, mvp);
goto loop;
}
- if (vinvalbuf(vp, 0, td, 0, 0))
+ if (vinvalbuf(vp, 0, 0, 0))
panic("ext2_reload: dirty2");
/*
* Step 5: re-read inode data for all active vnodes.
@@ -592,10 +592,9 @@ loop:
* Common code for mount and mountroot
*/
static int
-ext2_mountfs(devvp, mp, td)
+ext2_mountfs(devvp, mp)
struct vnode *devvp;
struct mount *mp;
- struct thread *td;
{
struct ext2mount *ump;
struct buf *bp;
@@ -623,7 +622,7 @@ ext2_mountfs(devvp, mp, td)
(SBSIZE < cp->provider->sectorsize)) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
return (EINVAL);
@@ -714,7 +713,7 @@ out:
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
}
@@ -773,7 +772,7 @@ ext2_unmount(mp, mntflags, td)
DROP_GIANT();
g_topology_lock();
- g_vfs_close(ump->um_cp, td);
+ g_vfs_close(ump->um_cp);
g_topology_unlock();
PICKUP_GIANT();
vrele(ump->um_devvp);
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c b/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
index 0ebad7d..9759d5a 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
@@ -266,7 +266,7 @@ xfs_flush_buftarg(
{
int error = 0;
- error = vinvalbuf(btp->specvp, V_SAVE|V_NORMAL, curthread, 0, 0);
+ error = vinvalbuf(btp->specvp, V_SAVE | V_NORMAL, 0, 0);
return error;
}
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
index ea815b2..1374fa5 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
@@ -246,7 +246,7 @@ _xfs_mount(struct mount *mp,
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
}
@@ -283,7 +283,7 @@ _xfs_unmount(mp, mntflags, td)
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
}
@@ -483,9 +483,10 @@ xfs_geom_bufwrite(struct buf *bp)
}
static int
-xfs_geom_bufsync(struct bufobj *bo, int waitfor, struct thread *td)
+xfs_geom_bufsync(struct bufobj *bo, int waitfor)
{
- return bufsync(bo,waitfor,td);
+
+ return (bufsync(bo, waitfor));
}
static void
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
index c7968bb..2d92d003 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
@@ -207,7 +207,7 @@ xfs_blkdev_put(
if (devvp == NULL)
return;
- vinvalbuf(devvp, V_SAVE, curthread, 0, 0);
+ vinvalbuf(devvp, V_SAVE, 0, 0);
cp = devvp->v_bufobj.bo_private;
DROP_GIANT();
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 239ee5a..f75963d 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3778,10 +3778,10 @@ bwait(struct buf *bp, u_char pri, const char *wchan)
}
int
-bufsync(struct bufobj *bo, int waitfor, struct thread *td)
+bufsync(struct bufobj *bo, int waitfor)
{
- return (VOP_FSYNC(bo->__bo_vnode, waitfor, td));
+ return (VOP_FSYNC(bo->__bo_vnode, waitfor, curthread));
}
void
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index afac5ed..9e4ed46 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -967,7 +967,7 @@ vfs_domount(
return (error);
}
}
- error = vinvalbuf(vp, V_SAVE, td, 0, 0);
+ error = vinvalbuf(vp, V_SAVE, 0, 0);
if (error != 0) {
vput(vp);
return (error);
@@ -1573,7 +1573,7 @@ devfs_fixup(struct thread *td)
if (vp->v_type != VDIR) {
vput(vp);
}
- error = vinvalbuf(vp, V_SAVE, td, 0, 0);
+ error = vinvalbuf(vp, V_SAVE, 0, 0);
if (error) {
vput(vp);
}
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index ce404ff..18ad471 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1065,8 +1065,7 @@ insmntque(struct vnode *vp, struct mount *mp)
* Called with the underlying object locked.
*/
int
-bufobj_invalbuf(struct bufobj *bo, int flags, struct thread *td, int slpflag,
- int slptimeo)
+bufobj_invalbuf(struct bufobj *bo, int flags, int slpflag, int slptimeo)
{
int error;
@@ -1079,7 +1078,7 @@ bufobj_invalbuf(struct bufobj *bo, int flags, struct thread *td, int slpflag,
}
if (bo->bo_dirty.bv_cnt > 0) {
BO_UNLOCK(bo);
- if ((error = BO_SYNC(bo, MNT_WAIT, td)) != 0)
+ if ((error = BO_SYNC(bo, MNT_WAIT)) != 0)
return (error);
/*
* XXX We could save a lock/unlock if this was only
@@ -1149,13 +1148,12 @@ bufobj_invalbuf(struct bufobj *bo, int flags, struct thread *td, int slpflag,
* Called with the underlying object locked.
*/
int
-vinvalbuf(struct vnode *vp, int flags, struct thread *td, int slpflag,
- int slptimeo)
+vinvalbuf(struct vnode *vp, int flags, int slpflag, int slptimeo)
{
CTR2(KTR_VFS, "vinvalbuf vp %p flags %d", vp, flags);
ASSERT_VOP_LOCKED(vp, "vinvalbuf");
- return (bufobj_invalbuf(&vp->v_bufobj, flags, td, slpflag, slptimeo));
+ return (bufobj_invalbuf(&vp->v_bufobj, flags, slpflag, slptimeo));
}
/*
@@ -2505,8 +2503,8 @@ vgonel(struct vnode *vp)
mp = NULL;
if (!TAILQ_EMPTY(&vp->v_bufobj.bo_dirty.bv_hd))
(void) vn_start_secondary_write(vp, &mp, V_WAIT);
- if (vinvalbuf(vp, V_SAVE, td, 0, 0) != 0)
- vinvalbuf(vp, 0, td, 0, 0);
+ if (vinvalbuf(vp, V_SAVE, 0, 0) != 0)
+ vinvalbuf(vp, 0, 0, 0);
/*
* If purging an active vnode, it must be closed and
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index 60ccb91e2..ef863e5 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -1323,11 +1323,11 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg)
goto out;
}
- error = vinvalbuf(vp, flags, td, slpflag, 0);
+ error = vinvalbuf(vp, flags, slpflag, 0);
while (error) {
if (intrflg && (error = nfs_sigintr(nmp, NULL, td)))
goto out;
- error = vinvalbuf(vp, flags, td, 0, slptimeo);
+ error = vinvalbuf(vp, flags, 0, slptimeo);
}
mtx_lock(&np->n_mtx);
if (np->n_directio_asyncwr == 0)
diff --git a/sys/sys/bufobj.h b/sys/sys/bufobj.h
index e491ce1..916b256 100644
--- a/sys/sys/bufobj.h
+++ b/sys/sys/bufobj.h
@@ -57,7 +57,6 @@
struct bufobj;
struct buf_ops;
-struct thread;
extern struct buf_ops buf_ops_bio;
@@ -72,7 +71,7 @@ struct bufv {
typedef void b_strategy_t(struct bufobj *, struct buf *);
typedef int b_write_t(struct buf *);
-typedef int b_sync_t(struct bufobj *, int waitfor, struct thread *td);
+typedef int b_sync_t(struct bufobj *, int waitfor);
typedef void b_bdflush_t(struct bufobj *, struct buf *);
struct buf_ops {
@@ -84,7 +83,7 @@ struct buf_ops {
};
#define BO_STRATEGY(bo, bp) ((bo)->bo_ops->bop_strategy((bo), (bp)))
-#define BO_SYNC(bo, w, td) ((bo)->bo_ops->bop_sync((bo), (w), (td)))
+#define BO_SYNC(bo, w) ((bo)->bo_ops->bop_sync((bo), (w)))
#define BO_WRITE(bo, bp) ((bo)->bo_ops->bop_write((bp)))
#define BO_BDFLUSH(bo, bp) ((bo)->bo_ops->bop_bdflush((bo), (bp)))
@@ -123,9 +122,9 @@ struct bufobj {
void bufobj_wdrop(struct bufobj *bo);
void bufobj_wref(struct bufobj *bo);
void bufobj_wrefl(struct bufobj *bo);
-int bufobj_invalbuf(struct bufobj *bo, int flags, struct thread *td, int slpflag, int slptimeo);
+int bufobj_invalbuf(struct bufobj *bo, int flags, int slpflag, int slptimeo);
int bufobj_wwait(struct bufobj *bo, int slpflag, int timeo);
-int bufsync(struct bufobj *bo, int waitfor, struct thread *td);
+int bufsync(struct bufobj *bo, int waitfor);
void bufbdflush(struct bufobj *bo, struct buf *bp);
#endif /* defined(_KERNEL) || defined(_KVM_VNODE) */
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 472f273..37248b2 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -598,8 +598,7 @@ int vget(struct vnode *vp, int lockflag, struct thread *td);
void vgone(struct vnode *vp);
void vhold(struct vnode *);
void vholdl(struct vnode *);
-int vinvalbuf(struct vnode *vp, int save,
- struct thread *td, int slpflag, int slptimeo);
+int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td,
off_t length, int blksize);
void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3);
diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c
index 4c58e41..bb3a48c 100644
--- a/sys/ufs/ffs/ffs_inode.c
+++ b/sys/ufs/ffs/ffs_inode.c
@@ -204,7 +204,7 @@ ffs_truncate(vp, length, flags, cred, td)
#ifdef QUOTA
(void) chkdq(ip, -extblocks, NOCRED, 0);
#endif
- vinvalbuf(vp, V_ALT, td, 0, 0);
+ vinvalbuf(vp, V_ALT, 0, 0);
ip->i_din2->di_extsize = 0;
for (i = 0; i < NXADDR; i++) {
oldblks[i] = ip->i_din2->di_extb[i];
@@ -280,7 +280,7 @@ ffs_truncate(vp, length, flags, cred, td)
softdep_setup_freeblocks(ip, length, needextclean ?
IO_EXT | IO_NORMAL : IO_NORMAL);
ASSERT_VOP_LOCKED(vp, "ffs_truncate1");
- vinvalbuf(vp, needextclean ? 0 : V_NORMAL, td, 0, 0);
+ vinvalbuf(vp, needextclean ? 0 : V_NORMAL, 0, 0);
vnode_pager_setsize(vp, 0);
ip->i_flag |= IN_CHANGE | IN_UPDATE;
return (ffs_update(vp, 0));
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 48a3879..483ad33 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -483,7 +483,7 @@ ffs_reload(struct mount *mp, struct thread *td)
*/
devvp = VFSTOUFS(mp)->um_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
- if (vinvalbuf(devvp, 0, td, 0, 0) != 0)
+ if (vinvalbuf(devvp, 0, 0, 0) != 0)
panic("ffs_reload: dirty1");
VOP_UNLOCK(devvp, 0);
@@ -570,7 +570,7 @@ loop:
MNT_VNODE_FOREACH_ABORT(mp, mvp);
goto loop;
}
- if (vinvalbuf(vp, 0, td, 0, 0))
+ if (vinvalbuf(vp, 0, 0, 0))
panic("ffs_reload: dirty2");
/*
* Step 5: re-read inode data for all active vnodes.
@@ -907,7 +907,7 @@ out:
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
- g_vfs_close(cp, td);
+ g_vfs_close(cp);
g_topology_unlock();
PICKUP_GIANT();
}
@@ -1098,7 +1098,7 @@ ffs_unmount(mp, mntflags, td)
}
DROP_GIANT();
g_topology_lock();
- g_vfs_close(ump->um_cp, td);
+ g_vfs_close(ump->um_cp);
g_topology_unlock();
PICKUP_GIANT();
vrele(ump->um_devvp);
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 2d54229..159f535 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -654,7 +654,7 @@ vm_object_terminate(vm_object_t object)
vm_object_page_clean(object, 0, 0, OBJPC_SYNC);
VM_OBJECT_UNLOCK(object);
- vinvalbuf(vp, V_SAVE, NULL, 0, 0);
+ vinvalbuf(vp, V_SAVE, 0, 0);
VM_OBJECT_LOCK(object);
}
OpenPOWER on IntegriCloud