From 8dbc63520c3ea67323c2b47ad6627f55595646fa Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Sun, 5 Jan 2020 00:59:47 +0000 Subject: [PATCH] vfs: drop thread argument from vinactive --- sys/kern/vfs_subr.c | 10 +++++----- sys/sys/vnode.h | 2 +- sys/ufs/ffs/ffs_snapshot.c | 4 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 5ff6e5b9b16..be025d8ef9a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2895,7 +2895,7 @@ vget_finish(struct vnode *vp, int flags, enum vgetstate vs) refcount_acquire(&vp->v_usecount); if (oweinact && VOP_ISLOCKED(vp) == LK_EXCLUSIVE && (flags & LK_NOWAIT) == 0) - vinactive(vp, curthread); + vinactive(vp); VI_UNLOCK(vp); return (0); } @@ -3061,7 +3061,7 @@ vputx(struct vnode *vp, enum vputx_op func) ("vnode with usecount and VI_OWEINACT set")); if (error == 0) { if (vp->v_iflag & VI_OWEINACT) - vinactive(vp, curthread); + vinactive(vp); if (func != VPUTX_VUNREF) VOP_UNLOCK(vp); } @@ -3280,7 +3280,7 @@ vdropl(struct vnode *vp) * failed lock upgrade. */ void -vinactive(struct vnode *vp, struct thread *td) +vinactive(struct vnode *vp) { struct vm_object *obj; @@ -3308,7 +3308,7 @@ vinactive(struct vnode *vp, struct thread *td) vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_WUNLOCK(obj); } - VOP_INACTIVE(vp, td); + VOP_INACTIVE(vp, curthread); VI_LOCK(vp); VNASSERT(vp->v_iflag & VI_DOINGINACT, vp, ("vinactive: lost VI_DOINGINACT")); @@ -3604,7 +3604,7 @@ vgonel(struct vnode *vp) if (oweinact || active) { VI_LOCK(vp); if ((vp->v_iflag & VI_DOINGINACT) == 0) - vinactive(vp, td); + vinactive(vp); VI_UNLOCK(vp); } if (vp->v_type == VSOCK) diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 333fa72d252..06810eb9a9c 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -663,7 +663,7 @@ void vgone(struct vnode *vp); void vhold(struct vnode *); void vholdl(struct vnode *); void vholdnz(struct vnode *); -void vinactive(struct vnode *, struct thread *); +void vinactive(struct vnode *vp); int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); int vtruncbuf(struct vnode *vp, off_t length, int blksize); void v_inval_buf_range(struct vnode *vp, daddr_t startlbn, daddr_t endlbn, diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index a6adaf5e5f8..8b999544c44 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -2552,10 +2552,8 @@ process_deferred_inactive(struct mount *mp) { struct vnode *vp, *mvp; struct inode *ip; - struct thread *td; int error; - td = curthread; (void) vn_start_secondary_write(NULL, &mp, V_WAIT); loop: MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { @@ -2591,7 +2589,7 @@ process_deferred_inactive(struct mount *mp) vdrop(vp); continue; } - vinactive(vp, td); + vinactive(vp); VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp, ("process_deferred_inactive: got VI_OWEINACT")); VI_UNLOCK(vp);