Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2017 16:59:51 +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: r312598 - head/sys/kern
Message-ID:  <201701211659.v0LGxpDr030785@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Sat Jan 21 16:59:50 2017
New Revision: 312598
URL: https://svnweb.freebsd.org/changeset/base/312598

Log:
  vfs: hide the getvnode NULL mp message behind DIAGNOSTIC
  
  Since crossmp vnode changes the message was being printed on each boot.
  
  Reported by:	trasz
  Discussed with:	kib

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Sat Jan 21 15:03:58 2017	(r312597)
+++ head/sys/kern/vfs_subr.c	Sat Jan 21 16:59:50 2017	(r312598)
@@ -1489,12 +1489,14 @@ alloc:
 	vp->v_op = vops;
 	v_init_counters(vp);
 	vp->v_bufobj.bo_ops = &buf_ops_bio;
+#ifdef DIAGNOSTIC
+	if (mp == NULL && vops != &dead_vnodeops)
+		printf("NULL mp in getnewvnode()\n");
+#endif
 #ifdef MAC
 	mac_vnode_init(vp);
 	if (mp != NULL && (mp->mnt_flag & MNT_MULTILABEL) == 0)
 		mac_vnode_associate_singlelabel(mp, vp);
-	else if (mp == NULL && vops != &dead_vnodeops)
-		printf("NULL mp in getnewvnode()\n");
 #endif
 	if (mp != NULL) {
 		vp->v_bufobj.bo_bsize = mp->mnt_stat.f_iosize;



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