Remove unused "cred" argument to ncl_flush().

The "cred" argument of ncl_flush() is unused and it was confusing to have
the code passing in NULL for this argument in some cases. This patch deletes
this argument.
There is no semantic change because of this patch.

MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2017-04-14 13:25:45 +00:00
parent a3a09aef5d
commit 6d4377c1ae
4 changed files with 9 additions and 10 deletions

View File

@ -592,7 +592,7 @@ int nfscl_maperr(NFSPROC_T *, int, uid_t, gid_t);
void nfscl_init(void);
/* nfs_clbio.c */
int ncl_flush(vnode_t, int, struct ucred *, NFSPROC_T *, int, int);
int ncl_flush(vnode_t, int, NFSPROC_T *, int, int);
/* nfs_clnode.c */
void ncl_invalcaches(vnode_t);

View File

@ -248,7 +248,7 @@ ncl_inactive(struct vop_inactive_args *ap)
} else
retv = TRUE;
if (retv == TRUE) {
(void)ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0);
(void)ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0);
(void)nfsrpc_close(vp, 1, ap->a_td);
}
}

View File

@ -3878,8 +3878,7 @@ nfscl_recalldeleg(struct nfsclclient *clp, struct nfsmount *nmp,
if ((dp->nfsdl_flags & NFSCLDL_WRITE) && (np->n_flag & NMODIFIED)) {
np->n_flag |= NDELEGRECALL;
NFSUNLOCKNODE(np);
ret = ncl_flush(vp, MNT_WAIT, cred, p, 1,
called_from_renewthread);
ret = ncl_flush(vp, MNT_WAIT, p, 1, called_from_renewthread);
NFSLOCKNODE(np);
np->n_flag &= ~NDELEGRECALL;
}

View File

@ -709,12 +709,12 @@ nfs_close(struct vop_close_args *ap)
* traditional vnode locking implemented for Vnode Ops.
*/
int cm = newnfs_commit_on_close ? 1 : 0;
error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm, 0);
error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0);
/* np->n_flag &= ~NMODIFIED; */
} else if (NFS_ISV4(vp)) {
if (nfscl_mustflush(vp) != 0) {
int cm = newnfs_commit_on_close ? 1 : 0;
error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td,
error = ncl_flush(vp, MNT_WAIT, ap->a_td,
cm, 0);
/*
* as above w.r.t races when clearing
@ -2631,7 +2631,7 @@ nfs_fsync(struct vop_fsync_args *ap)
*/
return (0);
}
return (ncl_flush(ap->a_vp, ap->a_waitfor, NULL, ap->a_td, 1, 0));
return (ncl_flush(ap->a_vp, ap->a_waitfor, ap->a_td, 1, 0));
}
/*
@ -2643,7 +2643,7 @@ nfs_fsync(struct vop_fsync_args *ap)
* waiting for a buffer write to complete.
*/
int
ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td,
ncl_flush(struct vnode *vp, int waitfor, struct thread *td,
int commit, int called_from_renewthread)
{
struct nfsnode *np = VTONFS(vp);
@ -3024,7 +3024,7 @@ nfs_advlock(struct vop_advlock_args *ap)
if (ap->a_op == F_UNLCK &&
nfscl_checkwritelocked(vp, ap->a_fl, cred, td, ap->a_id,
ap->a_flags))
(void) ncl_flush(vp, MNT_WAIT, cred, td, 1, 0);
(void) ncl_flush(vp, MNT_WAIT, td, 1, 0);
/*
* Loop around doing the lock op, while a blocking lock
@ -3404,7 +3404,7 @@ nfs_set_text(struct vop_set_text_args *ap)
}
/* Now, flush the buffer cache. */
ncl_flush(vp, MNT_WAIT, NULL, curthread, 0, 0);
ncl_flush(vp, MNT_WAIT, curthread, 0, 0);
/* And, finally, make sure that n_mtime is up to date. */
np = VTONFS(vp);