svn commit: r218187 - stable/8/sys/compat/linux
Konstantin Belousov
kib at FreeBSD.org
Wed Feb 2 12:22:44 UTC 2011
Author: kib
Date: Wed Feb 2 12:22:44 2011
New Revision: 218187
URL: http://svn.freebsd.org/changeset/base/218187
Log:
MFC r217578:
In linuxolator getdents_common(), do not loop if no records were returned
by VOP_READDIR().
Modified:
stable/8/sys/compat/linux/linux_file.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/compat/linux/linux_file.c
==============================================================================
--- stable/8/sys/compat/linux/linux_file.c Wed Feb 2 11:13:23 2011 (r218186)
+++ stable/8/sys/compat/linux/linux_file.c Wed Feb 2 12:22:44 2011 (r218187)
@@ -373,7 +373,6 @@ getdents_common(struct thread *td, struc
lbuf = malloc(LINUX_MAXRECLEN, M_TEMP, M_WAITOK | M_ZERO);
vn_lock(vp, LK_SHARED | LK_RETRY);
-again:
aiov.iov_base = buf;
aiov.iov_len = buflen;
auio.uio_iov = &aiov;
@@ -510,8 +509,10 @@ again:
break;
}
- if (outp == (caddr_t)args->dirent)
- goto again;
+ if (outp == (caddr_t)args->dirent) {
+ nbytes = resid;
+ goto eof;
+ }
fp->f_offset = off;
if (justone)
More information about the svn-src-all
mailing list