From owner-svn-src-stable@FreeBSD.ORG Wed Feb 2 12:22:44 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87F48106566C; Wed, 2 Feb 2011 12:22:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 781A38FC20; Wed, 2 Feb 2011 12:22:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p12CMiMV008899; Wed, 2 Feb 2011 12:22:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p12CMiq0008897; Wed, 2 Feb 2011 12:22:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201102021222.p12CMiq0008897@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 2 Feb 2011 12:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218187 - stable/8/sys/compat/linux X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2011 12:22:44 -0000 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)