aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2008-10-10 21:23:50 +0000
committerAttilio Rao <attilio@FreeBSD.org>2008-10-10 21:23:50 +0000
commit0d7935fd01df24b2eab5a826fd131cefb9417c79 (patch)
treefd8b76b514f556d4aec4cdd5d6fd55919f6e33ab /sys/kern/vfs_subr.c
parent6b386d393c367e425316e186ac75db5a41521338 (diff)
downloadsrc-0d7935fd01df24b2eab5a826fd131cefb9417c79.tar.gz
src-0d7935fd01df24b2eab5a826fd131cefb9417c79.zip
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>
Notes
Notes: svn path=/head/; revision=183754
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index ce404ff24f82..18ad4710eea7 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