diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2000-12-15 00:12:30 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2000-12-15 00:12:30 +0000 |
| commit | ea10b6b78e0830e76cf2221d98d24097c6c27073 (patch) | |
| tree | 3fc3e01b95c32c79e819833c4d767a98ee7cedcc /sys/fs | |
| parent | ec244c56951008b2b3eadec03206837737158165 (diff) | |
Notes
Diffstat (limited to 'sys/fs')
| -rw-r--r-- | sys/fs/coda/coda_vfsops.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c index 8fa46ffe0f5f..b426e8e6f958 100644 --- a/sys/fs/coda/coda_vfsops.c +++ b/sys/fs/coda/coda_vfsops.c @@ -294,6 +294,7 @@ coda_root(vfsp, vpp) int error; struct proc *p = curproc; /* XXX - bnoble */ ViceFid VFid; + struct ucred* uc; ENTRY; MARK_ENTRY(CODA_ROOT_STATS); @@ -317,7 +318,12 @@ coda_root(vfsp, vpp) } } - error = venus_root(vftomi(vfsp), p->p_ucred, p, &VFid); + PROC_LOCK(p); + uc = p->p_ucred; + crhold(uc); + PROC_UNLOCK(p); + error = venus_root(vftomi(vfsp), uc, p, &VFid); + crfree(uc); if (!error) { /* @@ -443,6 +449,7 @@ coda_fhtovp(vfsp, fhp, nam, vpp, exflagsp, creadanonp) int error; struct proc *p = curproc; /* XXX -mach */ ViceFid VFid; + struct ucred *uc; int vtype; ENTRY; @@ -456,7 +463,12 @@ coda_fhtovp(vfsp, fhp, nam, vpp, exflagsp, creadanonp) return(0); } - error = venus_fhtovp(vftomi(vfsp), &cfid->cfid_fid, p->p_ucred, p, &VFid, &vtype); + PROC_LOCK(p); + uc = p->p_ucred; + crhold(uc); + PROC_UNLOCK(p); + error = venus_fhtovp(vftomi(vfsp), &cfid->cfid_fid, uc, p, &VFid, &vtype); + crfree(uc); if (error) { CODADEBUG(CODA_VGET, myprintf(("vget error %d\n",error));) |
