Index: sys/kern/vfs_bio.c =================================================================== --- sys/kern/vfs_bio.c +++ sys/kern/vfs_bio.c @@ -4423,7 +4423,10 @@ CTR3(KTR_BUF, "bufdone(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); dropobj = NULL; - KASSERT(!(bp->b_flags & B_DONE), ("biodone: bp %p already done", bp)); + KASSERT((bp->b_flags & B_DONE) == 0, + ("biodone: bp %p already done", bp)); + KASSERT((bp->b_flags & B_BARRIER) == 0, + ("biodone: bp %p leaks B_BARRIER", bp)); runningbufwakeup(bp); if (bp->b_iocmd == BIO_WRITE) Index: sys/ufs/ffs/ffs_vfsops.c =================================================================== --- sys/ufs/ffs/ffs_vfsops.c +++ sys/ufs/ffs/ffs_vfsops.c @@ -2582,6 +2582,7 @@ error != EOPNOTSUPP) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; + bp->b_flags &= ~B_BARRIER; bufdone(bp); return; } @@ -2594,6 +2595,7 @@ if (error != 0 && error != EOPNOTSUPP) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; + bp->b_flags &= ~B_BARRIER; bufdone(bp); return; }