diff options
author | jhb <jhb@FreeBSD.org> | 2001-01-27 00:01:31 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-01-27 00:01:31 +0000 |
commit | b6baa60b1e807d09641c20b2ff1fe838ddebbd3b (patch) | |
tree | 81781cbbf3ad98f73e64d11188dfe3084b844e12 /sys/compat/linux/linux_file.c | |
parent | 0c5b7b7672ac24978496b6d8b72a9f4c74349b64 (diff) | |
download | FreeBSD-src-b6baa60b1e807d09641c20b2ff1fe838ddebbd3b.zip FreeBSD-src-b6baa60b1e807d09641c20b2ff1fe838ddebbd3b.tar.gz |
Back out proc locking to protect p_ucred for obtaining additional
references along with the actual obtaining of additional references.
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r-- | sys/compat/linux/linux_file.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 1bbe4cc..4736ddc 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -405,7 +405,6 @@ linux_getdents(struct proc *p, struct linux_getdents_args *args) int buflen, error, eofflag, nbytes, justone; u_long *cookies = NULL, *cookiep; int ncookies; - struct ucred *uc; #ifdef DEBUG printf("Linux-emul(%d): getdents(%d, *, %d)\n", @@ -423,13 +422,7 @@ linux_getdents(struct proc *p, struct linux_getdents_args *args) if (vp->v_type != VDIR) return (EINVAL); - PROC_LOCK(p); - uc = p->p_ucred; - crhold(uc); - PROC_UNLOCK(p); - error = VOP_GETATTR(vp, &va, uc, p); - crfree(uc); - if (error) { + if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p))) { return error; } |