socsvn commit: r222838 - in soc2011/gk/ino64-head/sys: fs/unionfs
kern
gk at FreeBSD.org
gk at FreeBSD.org
Sun Jun 5 16:19:49 UTC 2011
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;
More information about the svn-soc-all
mailing list