/* How many bytes of buffer space are used. Needs to be called with bufferlock held.  */
static int dasd_eer_get_filled_bytes(struct eerbuffer *eerb)
/* How many bytes of buffer space are used. Needs to be called with bufferlock held.  */
static int dasd_eer_get_filled_bytes(struct eerbuffer *eerb)
{
	if (eerb->head >= eerb->tail)
		return eerb->head - eerb->tail;
	return eerb->buffersize - eerb->tail + eerb->head;
}