summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_file.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-01-27 00:01:31 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-01-27 00:01:31 +0000
commitba88dfc73375c2729cafdc4c1da0c84e720b4c29 (patch)
tree736b37523fefba09638b90d177dab23b40c2ce3d /sys/compat/linux/linux_file.c
parentf0ae4fa2db4779c0b62db45a8135101e444b31d0 (diff)
Notes
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r--sys/compat/linux/linux_file.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 1bbe4cc04536..4736ddce9c1f 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;
}