diff options
author | kan <kan@FreeBSD.org> | 2003-11-19 04:12:32 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-19 04:12:32 +0000 |
commit | 75a6d15c52bad05737859d9aad8f63b11af0fe4e (patch) | |
tree | 3f95fbdecbf14d5e370381875947af11393fa27e /sys/compat/linux/linux_file.c | |
parent | 7328a76791475109c0698dddee208434684a8909 (diff) | |
download | FreeBSD-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/linux/linux_file.c')
-rw-r--r-- | sys/compat/linux/linux_file.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 96af89c..64fdb01 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -255,7 +255,6 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, struct file *fp; struct uio auio; struct iovec aiov; - struct vattr va; off_t off; struct l_dirent linux_dirent; struct l_dirent64 linux_dirent64; @@ -277,11 +276,6 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, return (EINVAL); } - if ((error = VOP_GETATTR(vp, &va, td->td_ucred, td))) { - fdrop(fp, td); - return (error); - } - nbytes = args->count; if (nbytes == 1) { /* readdir(2) case. Always struct dirent. */ |