vfs: drop thread argument from vinactive

This commit is contained in:
Mateusz Guzik 2020-01-05 00:59:47 +00:00
parent 867fd730c6
commit 8dbc63520c
3 changed files with 7 additions and 9 deletions

View file

@ -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)

View file

@ -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,

View file

@ -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);