1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

- Add two KASSERTs to prevent us from recycling a buf that is still on a

bufobj list.

Sponsored by:	Isilon Systems, Inc.
This commit is contained in:
Jeff Roberson 2005-04-22 00:53:20 +00:00
parent c0862430d5
commit 0d12524bbf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145384

View File

@ -1831,6 +1831,12 @@ getnewbuf(int slpflag, int slptimeo, int size, int maxsize)
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);