diff options
author | attilio <attilio@FreeBSD.org> | 2008-10-10 21:23:50 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-10-10 21:23:50 +0000 |
commit | b8bf37e5857b138031059dd4768deb4937efe183 (patch) | |
tree | fd8b76b514f556d4aec4cdd5d6fd55919f6e33ab /sys/kern/vfs_subr.c | |
parent | 7ce828dea0b330b67ef23488dde94b994adcdcfc (diff) | |
download | FreeBSD-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>
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 14 |
1 files changed, 6 insertions, 8 deletions
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 |