From 067115e050bdd1560bddbfa4e4648ef180f6948a Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Sat, 21 Jan 2017 16:59:50 +0000 Subject: [PATCH] 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 --- sys/kern/vfs_subr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d9c380c10023..6120045b768a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1489,12 +1489,14 @@ getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, 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;