Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jan 2020 05:36:46 +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: r356879 - head/sys/kern
Message-ID:  <202001190536.00J5akOr090274@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sun Jan 19 05:36:45 2020
New Revision: 356879
URL: https://svnweb.freebsd.org/changeset/base/356879

Log:
  vfs: plug a conditional assigment of lo_name in getnewvnode
  
  It only matters for witness. No functional changes.

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Sun Jan 19 04:13:19 2020	(r356878)
+++ head/sys/kern/vfs_subr.c	Sun Jan 19 05:36:45 2020	(r356879)
@@ -1669,11 +1669,15 @@ getnewvnode(const char *tag, struct mount *mp, struct 
 	 * that we can compare pointers rather than doing a strcmp().
 	 */
 	lo = &vp->v_vnlock->lock_object;
+#ifdef WITNESS
 	if (lo->lo_name != tag) {
+#endif
 		lo->lo_name = tag;
+#ifdef WITNESS
 		WITNESS_DESTROY(lo);
 		WITNESS_INIT(lo, tag);
 	}
+#endif
 	/*
 	 * By default, don't allow shared locks unless filesystems opt-in.
 	 */



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