vfs: drop the de facto curthread argument from VOP_INACTIVE
This commit is contained in:
parent
8ecd87a3e7
commit
ab21ed17ed
@ -5821,7 +5821,7 @@ zfs_freebsd_inactive(struct vop_inactive_args *ap)
|
|||||||
{
|
{
|
||||||
vnode_t *vp = ap->a_vp;
|
vnode_t *vp = ap->a_vp;
|
||||||
|
|
||||||
zfs_inactive(vp, ap->a_td->td_ucred, NULL);
|
zfs_inactive(vp, curthread->td_ucred, NULL);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5829,7 +5829,6 @@ zfs_freebsd_inactive(struct vop_inactive_args *ap)
|
|||||||
#ifndef _SYS_SYSPROTO_H_
|
#ifndef _SYS_SYSPROTO_H_
|
||||||
struct vop_need_inactive_args {
|
struct vop_need_inactive_args {
|
||||||
struct vnode *a_vp;
|
struct vnode *a_vp;
|
||||||
struct thread *a_td;
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -63,7 +63,6 @@ int
|
|||||||
cd9660_inactive(ap)
|
cd9660_inactive(ap)
|
||||||
struct vop_inactive_args /* {
|
struct vop_inactive_args /* {
|
||||||
struct vnode *a_vp;
|
struct vnode *a_vp;
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
} */ *ap;
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
|
@ -593,7 +593,7 @@ ext2_inactive(struct vop_inactive_args *ap)
|
|||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct inode *ip = VTOI(vp);
|
struct inode *ip = VTOI(vp);
|
||||||
struct thread *td = ap->a_td;
|
struct thread *td = curthread;
|
||||||
int mode, error = 0;
|
int mode, error = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -850,14 +850,13 @@ fake:
|
|||||||
/*
|
/*
|
||||||
struct vnop_inactive_args {
|
struct vnop_inactive_args {
|
||||||
struct vnode *a_vp;
|
struct vnode *a_vp;
|
||||||
struct thread *a_td;
|
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
fuse_vnop_inactive(struct vop_inactive_args *ap)
|
fuse_vnop_inactive(struct vop_inactive_args *ap)
|
||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct thread *td = ap->a_td;
|
struct thread *td = curthread;
|
||||||
|
|
||||||
struct fuse_vnode_data *fvdat = VTOFUD(vp);
|
struct fuse_vnode_data *fvdat = VTOFUD(vp);
|
||||||
struct fuse_filehandle *fufh, *fufh_tmp;
|
struct fuse_filehandle *fufh, *fufh_tmp;
|
||||||
|
@ -239,8 +239,10 @@ ncl_inactive(struct vop_inactive_args *ap)
|
|||||||
{
|
{
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct nfsnode *np;
|
struct nfsnode *np;
|
||||||
|
struct thread *td;
|
||||||
boolean_t retv;
|
boolean_t retv;
|
||||||
|
|
||||||
|
td = curthread;
|
||||||
if (NFS_ISV4(vp) && vp->v_type == VREG) {
|
if (NFS_ISV4(vp) && vp->v_type == VREG) {
|
||||||
/*
|
/*
|
||||||
* Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4
|
* Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4
|
||||||
@ -256,14 +258,14 @@ ncl_inactive(struct vop_inactive_args *ap)
|
|||||||
} else
|
} else
|
||||||
retv = TRUE;
|
retv = TRUE;
|
||||||
if (retv == TRUE) {
|
if (retv == TRUE) {
|
||||||
(void)ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0);
|
(void)ncl_flush(vp, MNT_WAIT, td, 1, 0);
|
||||||
(void)nfsrpc_close(vp, 1, ap->a_td);
|
(void)nfsrpc_close(vp, 1, td);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
np = VTONFS(vp);
|
np = VTONFS(vp);
|
||||||
NFSLOCKNODE(np);
|
NFSLOCKNODE(np);
|
||||||
ncl_releasesillyrename(vp, ap->a_td);
|
ncl_releasesillyrename(vp, td);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NMODIFIED means that there might be dirty/stale buffers
|
* NMODIFIED means that there might be dirty/stale buffers
|
||||||
|
@ -299,10 +299,9 @@ int
|
|||||||
smbfs_inactive(ap)
|
smbfs_inactive(ap)
|
||||||
struct vop_inactive_args /* {
|
struct vop_inactive_args /* {
|
||||||
struct vnode *a_vp;
|
struct vnode *a_vp;
|
||||||
struct thread *a_td;
|
|
||||||
} */ *ap;
|
} */ *ap;
|
||||||
{
|
{
|
||||||
struct thread *td = ap->a_td;
|
struct thread *td = curthread;
|
||||||
struct ucred *cred = td->td_ucred;
|
struct ucred *cred = td->td_ucred;
|
||||||
struct vnode *vp = ap->a_vp;
|
struct vnode *vp = ap->a_vp;
|
||||||
struct smbnode *np = VTOSMB(vp);
|
struct smbnode *np = VTOSMB(vp);
|
||||||
|
@ -3524,7 +3524,7 @@ vinactivef(struct vnode *vp)
|
|||||||
vm_object_page_clean(obj, 0, 0, 0);
|
vm_object_page_clean(obj, 0, 0, 0);
|
||||||
VM_OBJECT_WUNLOCK(obj);
|
VM_OBJECT_WUNLOCK(obj);
|
||||||
}
|
}
|
||||||
VOP_INACTIVE(vp, curthread);
|
VOP_INACTIVE(vp);
|
||||||
VI_LOCK(vp);
|
VI_LOCK(vp);
|
||||||
VNASSERT(vp->v_iflag & VI_DOINGINACT, vp,
|
VNASSERT(vp->v_iflag & VI_DOINGINACT, vp,
|
||||||
("vinactive: lost VI_DOINGINACT"));
|
("vinactive: lost VI_DOINGINACT"));
|
||||||
|
@ -397,7 +397,6 @@ vop_readlink {
|
|||||||
|
|
||||||
vop_inactive {
|
vop_inactive {
|
||||||
IN struct vnode *vp;
|
IN struct vnode *vp;
|
||||||
IN struct thread *td;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
%! need_inactive debugpre vop_need_inactive_debugpre
|
%! need_inactive debugpre vop_need_inactive_debugpre
|
||||||
|
Loading…
x
Reference in New Issue
Block a user