[Bug 223348] Inode number for directories change to inode number of directory two levels up causing hierarchy loop

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Nov 1 07:59:16 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223348

--- Comment #4 from Mateusz Guzik <mjg at FreeBSD.org> ---
wow, that's a fucking retarded bug if i ever seen one. sorry for the
inconvenience.

So to be clear, does this solve the problem for you?

diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 3da1c97..23c80a9 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -1126,7 +1126,8 @@ cache_lookup_nomakeentry(struct vnode *dvp, struct vnode
**vpp,
        uint32_t hash;
        int error;

-       if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {
+       if (cnp->cn_namelen == 2 &&
+           cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') {
                counter_u64_add(dotdothits, 1);
                dvlp = VP2VNODELOCK(dvp);
                dvlp2 = NULL;

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list