There is a case when B_VMIO is clear where a buffer can be placed on the
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 28 Jul 2005 18:15:09 +0000 (18:15 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 28 Jul 2005 18:15:09 +0000 (18:15 +0000)
commit9188c71110c81a847bed3cb05097b62763541447
tree3d4f74f977a4d953ef02e103b9d86d8c7e516282
parentd681a0bb7d0d3baa36d736cf0b2d3550dfbc07d4
There is a case when B_VMIO is clear where a buffer can be placed on the
EMPTY or EMPTYKVA queues without being disassociated from its vnode.
This can lead to a duplicate logical block panic in the red-black tree code.
Rework brelse() to ensure that buffers are properly cleaned up before being
placed on said queues, and add assertions to validate other cases.

Reported-by: Tomaz Borstnar
sys/kern/vfs_bio.c