summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-04-22 00:53:20 +0000
committerjeff <jeff@FreeBSD.org>2005-04-22 00:53:20 +0000
commitd8b31a35eae3d23ac713493d0b1870ebdf7fb7c0 (patch)
tree743d11d3007e2780cd48d0f77e43533866c5783f
parentb459bdba219f3fa62232f821fc325ce4a3f05974 (diff)
downloadFreeBSD-src-d8b31a35eae3d23ac713493d0b1870ebdf7fb7c0.zip
FreeBSD-src-d8b31a35eae3d23ac713493d0b1870ebdf7fb7c0.tar.gz
- Add two KASSERTs to prevent us from recycling a buf that is still on a
bufobj list. Sponsored by: Isilon Systems, Inc.
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index a530d93..665d47f 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1831,6 +1831,12 @@ restart:
buf_deallocate(bp);
if (bp->b_vflags & BV_BKGRDINPROG)
panic("losing buffer 3");
+ KASSERT(bp->b_vp == NULL,
+ ("bp: %p still has vnode %p. qindex: %d",
+ bp, bp->b_vp, qindex));
+ KASSERT((bp->b_xflags & (BX_VNCLEAN|BX_VNDIRTY)) == 0,
+ ("bp: %p still on a buffer list. xflags %X",
+ bp, bp->b_xflags));
if (bp->b_bufsize)
allocbuf(bp, 0);
OpenPOWER on IntegriCloud