FreeBSD/sys/kern/vfs_bio.c
/*
 *	buf_recycle:
 *
 *	Iterate through all clean queues until we find a buf to recycle or
 *	exhaust the search.
 */
Iterate through all clean queues until we find a buf to recycle or
exhaust the search.
Iterate through all clean queues until we find a buf to recycle or exhaust the search .
static int
buf_recycle(bool kva)
{
	int qindex, first_qindex;
	qindex = first_qindex = bqcleanq();
	do {
		if (buf_qrecycle(qindex, kva) == 0)
			return (0);
		if (++qindex == QUEUE_CLEAN + clean_queues)
			qindex = QUEUE_CLEAN;
	} while (qindex != first_qindex);
	return (ENOBUFS);
}
static int buf_recycle ( bool kva ) { int qindex , first_qindex ; qindex = first_qindex = bqcleanq ( ) ; do { if ( buf_qrecycle ( qindex , kva ) == 0 ) return ( 0 ) ; if ( ++ qindex == QUEUE_CLEAN + clean_queues ) qindex = QUEUE_CLEAN ; } while ( qindex != first_qindex ) ; return ( ENOBUFS ) ; }
buf_recycle:
      Iterate through all clean queues until we find a buf to recycle or
      exhaust the search.
buf_recycle : Iterate through all clean queues until we find a buf to recycle or exhaust the search .