From owner-svn-soc-all@FreeBSD.ORG Sun Jun 5 16:19:49 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id E05C5106564A for ; Sun, 5 Jun 2011 16:19:46 +0000 (UTC) (envelope-from gk@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sun, 05 Jun 2011 16:19:46 +0000 Date: Sun, 05 Jun 2011 16:19:46 +0000 From: gk@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110605161946.E05C5106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r222838 - in soc2011/gk/ino64-head/sys: fs/unionfs kern X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jun 2011 16:19:49 -0000 Author: gk Date: Sun Jun 5 16:19:46 2011 New Revision: 222838 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=222838 Log: Skip empty directory entries (entries with zero inode number) during name lookup Modified: soc2011/gk/ino64-head/sys/fs/unionfs/union_subr.c soc2011/gk/ino64-head/sys/kern/vfs_default.c Modified: soc2011/gk/ino64-head/sys/fs/unionfs/union_subr.c ============================================================================== --- soc2011/gk/ino64-head/sys/fs/unionfs/union_subr.c Sun Jun 5 16:19:34 2011 (r222837) +++ soc2011/gk/ino64-head/sys/fs/unionfs/union_subr.c Sun Jun 5 16:19:46 2011 (r222838) @@ -1177,7 +1177,7 @@ edp = (struct dirent*)&buf[sizeof(buf) - uio.uio_resid]; for (dp = (struct dirent*)buf; !error && dp < edp; dp = (struct dirent*)((caddr_t)dp + dp->d_reclen)) { - if (dp->d_type == DT_WHT || + if (dp->d_type == DT_WHT || dp->d_fileno == 0 || (dp->d_namlen == 1 && dp->d_name[0] == '.') || (dp->d_namlen == 2 && !bcmp(dp->d_name, "..", 2))) continue; Modified: soc2011/gk/ino64-head/sys/kern/vfs_default.c ============================================================================== --- soc2011/gk/ino64-head/sys/kern/vfs_default.c Sun Jun 5 16:19:34 2011 (r222837) +++ soc2011/gk/ino64-head/sys/kern/vfs_default.c Sun Jun 5 16:19:46 2011 (r222838) @@ -339,7 +339,7 @@ if (error) goto out; - if ((dp->d_type != DT_WHT) && + if (dp->d_type != DT_WHT && dp->d_fileno != 0 && !strcmp(dp->d_name, dirname)) { found = 1; goto out;