Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2019 13:41:22 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355415 - head/sys/fs/nullfs
Message-ID:  <201912051341.xB5DfMdc087836@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912051341.xB5DfMdc087836>