Author: mjg
Date: Sun Nov  5 08:31:25 2017
New Revision: 325433
URL: https://svnweb.freebsd.org/changeset/base/325433

Log:
  namecache: skip locking in cache_purge_negative if there are no entries

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c   Sun Nov  5 08:20:27 2017        (r325432)
+++ head/sys/kern/vfs_cache.c   Sun Nov  5 08:31:25 2017        (r325433)
@@ -1967,6 +1967,8 @@ cache_purge_negative(struct vnode *vp)
 
        CTR1(KTR_VFS, "cache_purge_negative(%p)", vp);
        SDT_PROBE1(vfs, namecache, purge_negative, done, vp);
+       if (LIST_EMPTY(&vp->v_cache_src))
+               return;
        TAILQ_INIT(&ncps);
        vlp = VP2VNODELOCK(vp);
        mtx_lock(vlp);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to