FreeBSD/sys/kern/vfs_bio.c
/*
 *	bundirty:
 *
 *	Clear B_DELWRI for buffer.
 *
 *	Since the buffer is not on a queue, we do not update the numfreebuffers
 *	count.
 *	
 *	The buffer must be on QUEUE_NONE.
 */
Clear B_DELWRI for buffer.

Since the buffer is not on a queue, we do not update the numfreebuffers
count.

The buffer must be on QUEUE_NONE.
Clear B_DELWRI for buffer . Since the buffer is not on a queue we do not update the numfreebuffers count . The buffer must be on QUEUE_NONE .
void
bundirty(struct buf *bp)
{
	CTR3(KTR_BUF, "bundirty(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
	KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
	KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE,
	    ("bundirty: buffer %p still on queue %d", bp, bp->b_qindex));
	BUF_ASSERT_HELD(bp);
	if (bp->b_flags & B_DELWRI) {
		bp->b_flags &= ~B_DELWRI;
		reassignbuf(bp);
		bdirtysub();
	}
	bp->b_flags &= ~B_DEFERRED;
}
void bundirty ( struct buf * bp ) { CTR3 ( KTR_BUF , " " , bp , bp -> b_vp , bp -> b_flags ) ; KASSERT ( bp -> b_bufobj != NULL , ( " " , bp ) ) ; KASSERT ( bp -> b_flags & B_REMFREE || bp -> b_qindex == QUEUE_NONE , ( " " , bp , bp -> b_qindex ) ) ; BUF_ASSERT_HELD ( bp ) ; if ( bp -> b_flags & B_DELWRI ) { bp -> b_flags &= ~ B_DELWRI ; reassignbuf ( bp ) ; bdirtysub ( ) ; } bp -> b_flags &= ~ B_DEFERRED ; }
bundirty:
      Clear B_DELWRI for buffer.
bundirty : Clear B_DELWRI for buffer .
/*
	 * Since it is now being written, we can clear its deferred write flag.
	 */