summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-02-08 23:27:10 +0000
committerjeff <jeff@FreeBSD.org>2005-02-08 23:27:10 +0000
commit06f7a532e93276cb96108556ec3b75f092592f21 (patch)
tree3b4efb69f29452295890e984afac0b4311fa8028 /sys
parentede81ae242bb8cffdec756ae7c2aa37e42a36225 (diff)
downloadFreeBSD-src-06f7a532e93276cb96108556ec3b75f092592f21.zip
FreeBSD-src-06f7a532e93276cb96108556ec3b75f092592f21.tar.gz
- Add a new assert in the getnewvnode(). Assert that the usecount is still
0 to detect getnewvnode() races. - Add the vnode address to a few panics near by to help in debugging. Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_subr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index d0dd62a..0bf82dd 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -806,9 +806,11 @@ getnewvnode(tag, mp, vops, vpp)
"address %p, inode %p\n",
vp, vp->v_data);
if (bo->bo_numoutput)
- panic("Clean vnode has pending I/O's");
+ panic("%p: Clean vnode has pending I/O's", vp);
+ if (vp->v_usecount != 0)
+ panic("%p: Non-zero use count", vp);
if (vp->v_writecount != 0)
- panic("Non-zero write count");
+ panic("%p: Non-zero write count", vp);
}
#endif
if ((pollinfo = vp->v_pollinfo) != NULL) {
OpenPOWER on IntegriCloud