svn commit: r183754 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/hpfs fs/msdosfs fs/ntfs fs/nwfs fs/smbfs fs/udf geom gnu/fs/ext2fs gnu/fs/xfs/FreeBSD kern nfsclient sys u...

Attilio Rao attilio at FreeBSD.org
Fri Oct 10 21:23:52 UTC 2008


Author: attilio
Date: Fri Oct 10 21:23:50 2008
New Revision: 183754
URL: http://svn.freebsd.org/changeset/base/183754

Log:
  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>

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
  head/sys/fs/cd9660/cd9660_vfsops.c
  head/sys/fs/hpfs/hpfs_vfsops.c
  head/sys/fs/msdosfs/msdosfs_vfsops.c
  head/sys/fs/ntfs/ntfs_vfsops.c
  head/sys/fs/nwfs/nwfs_io.c
  head/sys/fs/smbfs/smbfs_io.c
  head/sys/fs/udf/udf_vfsops.c
  head/sys/geom/geom_vfs.c
  head/sys/geom/geom_vfs.h
  head/sys/gnu/fs/ext2fs/ext2_vfsops.c
  head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
  head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
  head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
  head/sys/kern/vfs_bio.c
  head/sys/kern/vfs_mount.c
  head/sys/kern/vfs_subr.c
  head/sys/nfsclient/nfs_bio.c
  head/sys/sys/bufobj.h
  head/sys/sys/vnode.h
  head/sys/ufs/ffs/ffs_inode.c
  head/sys/ufs/ffs/ffs_vfsops.c
  head/sys/vm/vm_object.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -916,7 +916,7 @@ zfs_freesp(znode_t *zp, uint64_t off, ui
 #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
 	}

Modified: head/sys/fs/cd9660/cd9660_vfsops.c
==============================================================================
--- head/sys/fs/cd9660/cd9660_vfsops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/fs/cd9660/cd9660_vfsops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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 th
 	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 th
  * 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);

Modified: head/sys/fs/hpfs/hpfs_vfsops.c
==============================================================================
--- head/sys/fs/hpfs/hpfs_vfsops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/fs/hpfs/hpfs_vfsops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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);

Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -103,8 +103,7 @@ static MALLOC_DEFINE(M_MSDOSFSFAT, "msdo
 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 t
 		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 t
 }
 
 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 mn
 #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);

Modified: head/sys/fs/ntfs/ntfs_vfsops.c
==============================================================================
--- head/sys/fs/ntfs/ntfs_vfsops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/fs/ntfs/ntfs_vfsops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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();
 

Modified: head/sys/fs/nwfs/nwfs_io.c
==============================================================================
--- head/sys/fs/nwfs/nwfs_io.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/fs/nwfs/nwfs_io.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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) {

Modified: head/sys/fs/smbfs/smbfs_io.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_io.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/fs/smbfs/smbfs_io.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -690,7 +690,7 @@ smbfs_vinvalbuf(struct vnode *vp, struct
 		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
 			}
 			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) {

Modified: head/sys/fs/udf/udf_vfsops.c
==============================================================================
--- head/sys/fs/udf/udf_vfsops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/fs/udf/udf_vfsops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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 threa
 		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, uint1
 }
 
 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 
 	    (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 mntfla
 
 	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);

Modified: head/sys/geom/geom_vfs.c
==============================================================================
--- head/sys/geom/geom_vfs.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/geom/geom_vfs.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -163,7 +163,7 @@ g_vfs_open(struct vnode *vp, struct g_co
 }
 
 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, struc
 
 	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);
 }

Modified: head/sys/geom/geom_vfs.h
==============================================================================
--- head/sys/geom/geom_vfs.h	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/geom/geom_vfs.h	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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_ */

Modified: head/sys/gnu/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- head/sys/gnu/fs/ext2fs/ext2_vfsops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/gnu/fs/ext2fs/ext2_vfsops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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 thr
 	 */
 	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);

Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
==============================================================================
--- head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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;
 }
 

Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
==============================================================================
--- head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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

Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
==============================================================================
--- head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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();

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/kern/vfs_bio.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -3778,10 +3778,10 @@ bwait(struct buf *bp, u_char pri, const 
 }
 
 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

Modified: head/sys/kern/vfs_mount.c
==============================================================================
--- head/sys/kern/vfs_mount.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/kern/vfs_mount.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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);
 	}

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/kern/vfs_subr.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -1065,8 +1065,7 @@ insmntque(struct vnode *vp, struct mount
  * 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 f
 		}
 		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 f
  * 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

Modified: head/sys/nfsclient/nfs_bio.c
==============================================================================
--- head/sys/nfsclient/nfs_bio.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/nfsclient/nfs_bio.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -1323,11 +1323,11 @@ nfs_vinvalbuf(struct vnode *vp, int flag
 			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)

Modified: head/sys/sys/bufobj.h
==============================================================================
--- head/sys/sys/bufobj.h	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/sys/bufobj.h	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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) */

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/sys/vnode.h	Fri Oct 10 21:23:50 2008	(r183754)
@@ -598,8 +598,7 @@ int	vget(struct vnode *vp, int lockflag,
 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);

Modified: head/sys/ufs/ffs/ffs_inode.c
==============================================================================
--- head/sys/ufs/ffs/ffs_inode.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/ufs/ffs/ffs_inode.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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));

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vfsops.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/ufs/ffs/ffs_vfsops.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -483,7 +483,7 @@ ffs_reload(struct mount *mp, struct thre
 	 */
 	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);

Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c	Fri Oct 10 21:18:12 2008	(r183753)
+++ head/sys/vm/vm_object.c	Fri Oct 10 21:23:50 2008	(r183754)
@@ -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);
 	}


More information about the svn-src-head mailing list