summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2004-10-06 02:06:11 +0000
committergrog <grog@FreeBSD.org>2004-10-06 02:06:11 +0000
commit882d69104e8714af21885a5c123811a74609b35b (patch)
treeeb0c1f2775a9bdeac1bc29606ab6c6b7684f7b44 /sys
parent7acde29a24b157a2527a146a22bcffc359e86b1e (diff)
downloadFreeBSD-src-882d69104e8714af21885a5c123811a74609b35b.zip
FreeBSD-src-882d69104e8714af21885a5c123811a74609b35b.tar.gz
getnewvnode: Weaken the panic "cleaned vnode isn't" to a warning.
Discussion: this panic (or waning) only occurs when the kernel is compiled with INVARIANTS. Otherwise the problem (which means that the vp->v_data field isn't NULL, and represents a coding error and possibly a memory leak) is silently ignored by setting it to NULL later on. Panicking here isn't very helpful: by this time, we can only find the symptoms. The panic occurs long after the reason for "not cleaning" has been forgotten; in the case in point, it was the result of severe file system corruption which left the v_type field set to VBAD. That issue will be addressed by a separate commit.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_subr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 71372da..d568892 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -787,7 +787,9 @@ getnewvnode(tag, mp, vops, vpp)
#ifdef INVARIANTS
{
if (vp->v_data)
- panic("cleaned vnode isn't");
+ printf("cleaned vnode isn't, "
+ "address %p, inode %p\n",
+ vp, vp->v_data);
if (vp->v_numoutput)
panic("Clean vnode has pending I/O's");
if (vp->v_writecount != 0)
OpenPOWER on IntegriCloud