diff options
author | Gleb Kurtsou <gleb@FreeBSD.org> | 2012-05-16 10:44:09 +0000 |
---|---|---|
committer | Gleb Kurtsou <gleb@FreeBSD.org> | 2012-05-16 10:44:09 +0000 |
commit | ac13a90c4b9d346391a6ddb81f39f55ae9ad8f5b (patch) | |
tree | 337ab8d770eb1aa09bec1bd91f8f24f48826aa0e /sys/kern/vfs_default.c | |
parent | 9e460a98e637c142255e79c14dc4886b2fbeba4e (diff) | |
download | src-ac13a90c4b9d346391a6ddb81f39f55ae9ad8f5b.tar.gz src-ac13a90c4b9d346391a6ddb81f39f55ae9ad8f5b.zip |
Skip directory entries with zero inode number during traversal.
Entries with zero inode number are considered placeholders by libc and
UFS. Fix remaining uses of VOP_READDIR in kernel: vop_stdvptocnp,
unionfs.
Sponsored by: Google Summer of Code 2011
Notes
Notes:
svn path=/head/; revision=235503
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r-- | sys/kern/vfs_default.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 4e6276583888..91b30a814ed9 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -343,8 +343,8 @@ dirent_exists(struct vnode *vp, const char *dirname, struct thread *td) if (error) goto out; - if ((dp->d_type != DT_WHT) && - !strcmp(dp->d_name, dirname)) { + if (dp->d_type != DT_WHT && dp->d_fileno != 0 && + strcmp(dp->d_name, dirname) == 0) { found = 1; goto out; } |