summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-11-19 04:12:32 +0000
committerkan <kan@FreeBSD.org>2003-11-19 04:12:32 +0000
commit75a6d15c52bad05737859d9aad8f63b11af0fe4e (patch)
tree3f95fbdecbf14d5e370381875947af11393fa27e /sys/compat/svr4
parent7328a76791475109c0698dddee208434684a8909 (diff)
downloadFreeBSD-src-75a6d15c52bad05737859d9aad8f63b11af0fe4e.zip
FreeBSD-src-75a6d15c52bad05737859d9aad8f63b11af0fe4e.tar.gz
Do not call VOP_GETATTR in getdents function. It does not serve any
purpose and the resulting vattr structure was ignored. In addition, the VOP_GETATTR call was made with no vnode lock held, resulting in vnode locking violation panic with debug kernels. Reported by: truckman Approved by: re@ (rwatson)
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_misc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 2bf5df9..0f43612 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -254,7 +254,6 @@ svr4_sys_getdents64(td, uap)
struct file *fp;
struct uio auio;
struct iovec aiov;
- struct vattr va;
off_t off;
struct svr4_dirent64 svr4_dirent;
int buflen, error, eofflag, nbytes, justone;
@@ -279,11 +278,6 @@ svr4_sys_getdents64(td, uap)
return (EINVAL);
}
- if ((error = VOP_GETATTR(vp, &va, td->td_ucred, td))) {
- fdrop(fp, td);
- return error;
- }
-
nbytes = uap->nbytes;
if (nbytes == 1) {
nbytes = sizeof (struct svr4_dirent64);
OpenPOWER on IntegriCloud