Date: Sun, 05 Jun 2011 16:19:46 +0000 From: gk@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r222838 - in soc2011/gk/ino64-head/sys: fs/unionfs kern Message-ID: <20110605161946.E05C5106564A@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110605161946.E05C5106564A>