vfs: remove the always-curthread td argument from VOP_RECLAIM

This commit is contained in:
Mateusz Guzik 2020-08-19 07:28:01 +00:00
parent 7ad2a82da2
commit 8f226f4c23
9 changed files with 8 additions and 11 deletions

View File

@ -86,7 +86,6 @@ int
cd9660_reclaim(ap)
struct vop_reclaim_args /* {
struct vnode *a_vp;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;

View File

@ -1527,14 +1527,13 @@ fuse_vnop_readlink(struct vop_readlink_args *ap)
/*
struct vnop_reclaim_args {
struct vnode *a_vp;
struct thread *a_td;
};
*/
static int
fuse_vnop_reclaim(struct vop_reclaim_args *ap)
{
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_filehandle *fufh, *fufh_tmp;

View File

@ -286,6 +286,9 @@ ncl_reclaim(struct vop_reclaim_args *ap)
struct vnode *vp = ap->a_vp;
struct nfsnode *np = VTONFS(vp);
struct nfsdmap *dp, *dp2;
struct thread *td;
td = curthread;
/*
* If the NLM is running, give it a chance to abort pending
@ -295,7 +298,7 @@ ncl_reclaim(struct vop_reclaim_args *ap)
nfs_reclaim_p(ap);
NFSLOCKNODE(np);
ncl_releasesillyrename(vp, ap->a_td);
ncl_releasesillyrename(vp, td);
NFSUNLOCKNODE(np);
if (NFS_ISV4(vp) && vp->v_type == VREG)
@ -305,7 +308,7 @@ ncl_reclaim(struct vop_reclaim_args *ap)
* ncl_inactive(), but there are cases where it is not
* called, so we need to do it again here.
*/
(void) nfsrpc_close(vp, 1, ap->a_td);
(void) nfsrpc_close(vp, 1, td);
vfs_hash_remove(vp);

View File

@ -260,7 +260,6 @@ int
smbfs_reclaim(ap)
struct vop_reclaim_args /* {
struct vnode *a_vp;
struct thread *a_p;
} */ *ap;
{
struct vnode *vp = ap->a_vp;

View File

@ -1731,7 +1731,7 @@ unionfs_reclaim(struct vop_reclaim_args *ap)
{
/* UNIONFS_INTERNAL_DEBUG("unionfs_reclaim: enter\n"); */
unionfs_noderem(ap->a_vp, ap->a_td);
unionfs_noderem(ap->a_vp, curthread);
/* UNIONFS_INTERNAL_DEBUG("unionfs_reclaim: leave\n"); */

View File

@ -1099,7 +1099,6 @@ mqfs_inactive(struct vop_inactive_args *ap)
struct vop_reclaim_args {
struct vop_generic_args a_gen;
struct vnode *a_vp;
struct thread *a_td;
};
#endif

View File

@ -3879,7 +3879,7 @@ vgonel(struct vnode *vp)
/*
* Reclaim the vnode.
*/
if (VOP_RECLAIM(vp, td))
if (VOP_RECLAIM(vp))
panic("vgone: cannot reclaim");
if (mp != NULL)
vn_finished_secondary_write(mp);

View File

@ -401,7 +401,6 @@ vop_need_inactive {
vop_reclaim {
IN struct vnode *vp;
IN struct thread *td;
};

View File

@ -222,7 +222,6 @@ int
ufs_reclaim(ap)
struct vop_reclaim_args /* {
struct vnode *a_vp;
struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;