From 9761044c2fc6921d742d0406e7a00f0d33ece295 Mon Sep 17 00:00:00 2001 From: kan Date: Tue, 14 Apr 2009 23:56:48 +0000 Subject: Redo previous change using simpler patch that happens to be also more correct. Submitted by: tor --- sys/kern/vfs_cache.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sys/kern/vfs_cache.c') diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index f00307c..a541d76 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -423,15 +423,8 @@ retry_wlocked: *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); + ncp = dvp->v_cache_dd; + goto negative_success; } CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", dvp, cnp->cn_nameptr, *vpp); @@ -486,6 +479,7 @@ retry_wlocked: goto success; } +negative_success: /* We found a negative match, and want to create it, so purge */ if (cnp->cn_nameiop == CREATE) { numnegzaps++; -- cgit v1.1