diff options
author | kan <kan@FreeBSD.org> | 2009-04-14 23:46:57 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2009-04-14 23:46:57 +0000 |
commit | 3d27e1410d9f91970abd08abfdcb08ef819417ed (patch) | |
tree | 9b7a1363051c887447ba88785e6b0b8b938862ca /sys/kern/vfs_cache.c | |
parent | 8149bfaed6bb48e24c81b4fe830665f412bc7e32 (diff) | |
download | FreeBSD-src-3d27e1410d9f91970abd08abfdcb08ef819417ed.zip FreeBSD-src-3d27e1410d9f91970abd08abfdcb08ef819417ed.tar.gz |
Fix yet another negative dotodot entry fallout.
Reported by: pho
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r-- | sys/kern/vfs_cache.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 3c81b01..f00307c 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -421,6 +421,18 @@ retry_wlocked: *vpp = dvp->v_cache_dd->nc_vp; else *vpp = dvp->v_cache_dd->nc_dvp; + /* Return failure if negative entry was found. */ + if (*vpp == NULL) { + numneghits++; + nchstats.ncs_neghits++; + SDT_PROBE(vfs, namecache, lookup, hit_negative, + dvp, "..", 0, 0, 0); + if (wlocked) + CACHE_WUNLOCK(); + else + CACHE_RUNLOCK(); + return (ENOENT); + } CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", dvp, cnp->cn_nameptr, *vpp); SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..", |