/* How many free bytes are available on the buffer. Needs to be called with bufferlock held.  */
static int dasd_eer_get_free_bytes(struct eerbuffer *eerb)
/* How many free bytes are available on the buffer. Needs to be called with bufferlock held.  */
static int dasd_eer_get_free_bytes(struct eerbuffer *eerb)
{
	if (eerb->head < eerb->tail)
		return eerb->tail - eerb->head - 1;
	return eerb->buffersize - eerb->head + eerb->tail -1;
}