diff options
author | attilio <attilio@FreeBSD.org> | 2008-08-28 15:23:18 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-08-28 15:23:18 +0000 |
commit | dbf35e279f37ad4a573bf93923d141cb4a454c7d (patch) | |
tree | 61fe2ab5660fec327061e18eda0ed8c65276f262 /sys/fs/coda | |
parent | fb7f3b6363b61cead7eb5e94ac7f816358fc19ab (diff) | |
download | FreeBSD-src-dbf35e279f37ad4a573bf93923d141cb4a454c7d.zip FreeBSD-src-dbf35e279f37ad4a573bf93923d141cb4a454c7d.tar.gz |
Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed thread
was always curthread and totally unuseful.
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Diffstat (limited to 'sys/fs/coda')
-rw-r--r-- | sys/fs/coda/coda_venus.c | 10 | ||||
-rw-r--r-- | sys/fs/coda/coda_venus.h | 4 | ||||
-rw-r--r-- | sys/fs/coda/coda_vnops.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c index c69741b..1586f36 100644 --- a/sys/fs/coda/coda_venus.c +++ b/sys/fs/coda/coda_venus.c @@ -304,15 +304,16 @@ venus_ioctl(void *mdp, CodaFid *fid, int com, int flag, caddr_t data, } int -venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, struct proc *p, - /*out*/ struct vattr *vap) +venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, struct vattr *vap) { + struct proc *p; DECL(coda_getattr); /* sets Isize & Osize */ ALLOC(coda_getattr); /* sets inp & outp */ /* * Send the open to venus. */ + p = curthread->td_proc; INIT_IN(&inp->ih, CODA_GETATTR, cred, p); inp->Fid = *fid; @@ -325,15 +326,16 @@ venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, struct proc *p, } int -venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, struct ucred *cred, - struct proc *p) +venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, struct ucred *cred) { + struct proc *p; DECL_NO_OUT(coda_setattr); /* sets Isize & Osize */ ALLOC_NO_OUT(coda_setattr); /* sets inp & outp */ /* * Send the open to venus. */ + p = curthread->td_proc; INIT_IN(&inp->ih, CODA_SETATTR, cred, p); inp->Fid = *fid; CNV_V2VV_ATTR(&inp->attr, vap); diff --git a/sys/fs/coda/coda_venus.h b/sys/fs/coda/coda_venus.h index 97e7be3..0d4dac0 100644 --- a/sys/fs/coda/coda_venus.h +++ b/sys/fs/coda/coda_venus.h @@ -44,9 +44,9 @@ void venus_write(void); int venus_ioctl(void *mdp, CodaFid *fid, int com, int flag, caddr_t data, struct ucred *cred, struct proc *p); int venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, - struct proc *p, /*out*/ struct vattr *vap); + struct vattr *vap); int venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, - struct ucred *cred, struct proc *p); + struct ucred *cred); int venus_access(void *mdp, CodaFid *fid, int mode, struct ucred *cred, struct proc *p); int venus_readlink(void *mdp, CodaFid *fid, struct ucred *cred, diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index a24a9aa..f6165a9 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -382,7 +382,7 @@ coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw, int ioflag, */ { struct vattr attr; - if (VOP_GETATTR(cfvp, &attr, cred, td) == 0) + if (VOP_GETATTR(cfvp, &attr, cred) == 0) vnode_pager_setsize(vp, attr.va_size); } } @@ -504,7 +504,6 @@ coda_getattr(struct vop_getattr_args *ap) struct cnode *cp = VTOC(vp); struct vattr *vap = ap->a_vap; struct ucred *cred = ap->a_cred; - struct thread *td = ap->a_td; /* locals */ struct vnode *convp; int error, size; @@ -533,7 +532,7 @@ coda_getattr(struct vop_getattr_args *ap) MARK_INT_SAT(CODA_GETATTR_STATS); return (0); } - error = venus_getattr(vtomi(vp), &cp->c_fid, cred, td->td_proc, vap); + error = venus_getattr(vtomi(vp), &cp->c_fid, cred, vap); if (!error) { CODADEBUG(CODA_GETATTR, myprintf(("getattr miss %s: result " "%d\n", coda_f2s(&cp->c_fid), error));); @@ -568,7 +567,6 @@ coda_setattr(struct vop_setattr_args *ap) struct cnode *cp = VTOC(vp); struct vattr *vap = ap->a_vap; struct ucred *cred = ap->a_cred; - struct thread *td = ap->a_td; /* locals */ struct vnode *convp; int error, size; @@ -584,7 +582,7 @@ coda_setattr(struct vop_setattr_args *ap) } if (codadebug & CODADBGMSK(CODA_SETATTR)) coda_print_vattr(vap); - error = venus_setattr(vtomi(vp), &cp->c_fid, vap, cred, td->td_proc); + error = venus_setattr(vtomi(vp), &cp->c_fid, vap, cred); if (!error) cp->c_flags &= ~(C_VATTR | C_ACCCACHE); |