Author: mjg
Date: Thu Dec  5 13:41:22 2019
New Revision: 355415
URL: https://svnweb.freebsd.org/changeset/base/355415

Log:
  nullfs: locklessly check for entries in null_hashget
  
  During random sampling over poudriere -j 104 over 10% of calls returned NULL.

Modified:
  head/sys/fs/nullfs/null_subr.c

Modified: head/sys/fs/nullfs/null_subr.c
==============================================================================
--- head/sys/fs/nullfs/null_subr.c      Thu Dec  5 13:40:10 2019        
(r355414)
+++ head/sys/fs/nullfs/null_subr.c      Thu Dec  5 13:41:22 2019        
(r355415)
@@ -113,6 +113,8 @@ null_hashget(mp, lowervp)
         * reference count (but NOT the lower vnode's VREF counter).
         */
        hd = NULL_NHASH(lowervp);
+       if (LIST_EMPTY(hd))
+               return (NULLVP);
        rw_rlock(&null_hash_lock);
        LIST_FOREACH(a, hd, null_hash) {
                if (a->null_lowervp == lowervp && NULLTOV(a)->v_mount == mp) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to