diff options
author | phk <phk@FreeBSD.org> | 2005-01-24 12:31:06 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-24 12:31:06 +0000 |
commit | 8dba90be168ab4e2ecb93c48648cdc25ce518be1 (patch) | |
tree | 77150cec4edeae78f2822693f106746ee29e0386 | |
parent | d084122f3697505f1422b27c5d64204b1bcf66d4 (diff) | |
download | FreeBSD-src-8dba90be168ab4e2ecb93c48648cdc25ce518be1.zip FreeBSD-src-8dba90be168ab4e2ecb93c48648cdc25ce518be1.tar.gz |
Remove unused cred arg from nfs_vinvalbuf() and many bogus arguments
passed for it.
-rw-r--r-- | sys/nfs4client/nfs4_vnops.c | 13 | ||||
-rw-r--r-- | sys/nfsclient/nfs.h | 3 | ||||
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 11 | ||||
-rw-r--r-- | sys/nfsclient/nfs_node.c | 2 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 21 |
5 files changed, 21 insertions, 29 deletions
diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c index a723b04..75ed530 100644 --- a/sys/nfs4client/nfs4_vnops.c +++ b/sys/nfs4client/nfs4_vnops.c @@ -682,7 +682,7 @@ nfs4_close(struct vop_close_args *ap) if (np->n_flag & NMODIFIED) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, ap->a_td); - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); VOP_UNLOCK(vp, 0, ap->a_td); np->n_attrstamp = 0; } @@ -820,11 +820,9 @@ nfs4_setattr(struct vop_setattr_args *ap) if (np->n_flag & NMODIFIED) { if (vap->va_size == 0) - error = nfs_vinvalbuf(vp, 0, - ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, 0, ap->a_td, 1); else - error = nfs_vinvalbuf(vp, V_SAVE, - ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error) { vnode_pager_setsize(vp, np->n_size); return (error); @@ -841,8 +839,7 @@ nfs4_setattr(struct vop_setattr_args *ap) } else if ((vap->va_mtime.tv_sec != VNOVAL || vap->va_atime.tv_sec != VNOVAL) && (np->n_flag & NMODIFIED) && vp->v_type == VREG && - (error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, - ap->a_td, 1)) == EINTR) + (error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1)) == EINTR) return (error); if (vap->va_size != VNOVAL && np->n_wfc.refcnt == 0) { @@ -1669,7 +1666,7 @@ nfs4_remove(struct vop_remove_args *ap) * throw away biocache buffers, mainly to avoid * unnecessary delayed writes later. */ - error = nfs_vinvalbuf(vp, 0, cnp->cn_cred, cnp->cn_thread, 1); + error = nfs_vinvalbuf(vp, 0, cnp->cn_thread, 1); /* Do the rpc */ if (error != EINTR) error = nfs4_removerpc(dvp, cnp->cn_nameptr, diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 2b45c42..dd8cfd0 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -265,8 +265,7 @@ int nfs_sndlock(struct nfsreq *); void nfs_sndunlock(struct nfsreq *); #endif /* ! NFS4_USE_RPCCLNT */ -int nfs_vinvalbuf(struct vnode *, int, struct ucred *, struct thread *, - int); +int nfs_vinvalbuf(struct vnode *, int, struct thread *, int); int nfs_readrpc(struct vnode *, struct uio *, struct ucred *); int nfs_writerpc(struct vnode *, struct uio *, struct ucred *, int *, int *); diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index beaa0b1..f0f5d53 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -409,7 +409,7 @@ nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) if (vp->v_type != VDIR) panic("nfs: bioread, not dir"); (nmp->nm_rpcops->nr_invaldir)(vp); - error = nfs_vinvalbuf(vp, V_SAVE, cred, td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, td, 1); if (error) return (error); } @@ -426,7 +426,7 @@ nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) || (NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime))) { if (vp->v_type == VDIR) (nmp->nm_rpcops->nr_invaldir)(vp); - error = nfs_vinvalbuf(vp, V_SAVE, cred, td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, td, 1); if (error) return (error); np->n_mtime = vattr.va_mtime; @@ -587,7 +587,7 @@ again: } while (error == NFSERR_BAD_COOKIE) { (nmp->nm_rpcops->nr_invaldir)(vp); - error = nfs_vinvalbuf(vp, 0, cred, td, 1); + error = nfs_vinvalbuf(vp, 0, td, 1); /* * Yuck! The directory has been modified on the * server. The only way to get the block is by @@ -881,7 +881,7 @@ nfs_write(struct vop_write_args *ap) if (ioflag & (IO_APPEND | IO_SYNC)) { if (np->n_flag & NMODIFIED) { np->n_attrstamp = 0; - error = nfs_vinvalbuf(vp, V_SAVE, cred, td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, td, 1); if (error) return (error); } @@ -1221,8 +1221,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td) * doing the flush, just wait for completion. */ int -nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred, - struct thread *td, int intrflg) +nfs_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) { struct nfsnode *np = VTONFS(vp); struct nfsmount *nmp = VFSTONFS(vp->v_mount); diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index fc0cb69..19c1cab 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -306,7 +306,7 @@ nfs_inactive(struct vop_inactive_args *ap) } else sp = NULL; if (sp) { - (void)nfs_vinvalbuf(ap->a_vp, 0, sp->s_cred, td, 1); + (void)nfs_vinvalbuf(ap->a_vp, 0, td, 1); /* * Remove the silly file that was rename'd earlier */ diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index b92b1fa..1f55410 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -428,7 +428,7 @@ nfs_open(struct vop_open_args *ap) * Get a valid lease. If cached data is stale, flush it. */ if (np->n_flag & NMODIFIED) { - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) return (error); np->n_attrstamp = 0; @@ -446,8 +446,7 @@ nfs_open(struct vop_open_args *ap) if (NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime)) { if (vp->v_type == VDIR) np->n_direofoffset = 0; - error = nfs_vinvalbuf(vp, V_SAVE, - ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) return (error); np->n_mtime = vattr.va_mtime; @@ -458,7 +457,7 @@ nfs_open(struct vop_open_args *ap) */ if (nfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { if (np->n_directio_opens == 0) { - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error) return (error); np->n_flag |= NNONCACHE; @@ -537,7 +536,7 @@ nfs_close(struct vop_close_args *ap) error = nfs_flush(vp, MNT_WAIT, ap->a_td, cm); /* np->n_flag &= ~NMODIFIED; */ } else { - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); } } /* @@ -674,11 +673,9 @@ nfs_setattr(struct vop_setattr_args *ap) if (np->n_flag & NMODIFIED) { if (vap->va_size == 0) - error = nfs_vinvalbuf(vp, 0, - ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, 0, ap->a_td, 1); else - error = nfs_vinvalbuf(vp, V_SAVE, - ap->a_cred, ap->a_td, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error) { vnode_pager_setsize(vp, np->n_size); return (error); @@ -695,8 +692,8 @@ nfs_setattr(struct vop_setattr_args *ap) } else if ((vap->va_mtime.tv_sec != VNOVAL || vap->va_atime.tv_sec != VNOVAL) && (np->n_flag & NMODIFIED) && vp->v_type == VREG && - (error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, - ap->a_td, 1)) != 0 && (error == EINTR || error == EIO)) + (error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1)) != 0 && + (error == EINTR || error == EIO)) return (error); error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_td); if (error && vap->va_size != VNOVAL) { @@ -1472,7 +1469,7 @@ nfs_remove(struct vop_remove_args *ap) * throw away biocache buffers, mainly to avoid * unnecessary delayed writes later. */ - error = nfs_vinvalbuf(vp, 0, cnp->cn_cred, cnp->cn_thread, 1); + error = nfs_vinvalbuf(vp, 0, cnp->cn_thread, 1); /* Do the rpc */ if (error != EINTR && error != EIO) error = nfs_removerpc(dvp, cnp->cn_nameptr, |