/* Resets the iterator, so that it will start from the beginning again.  */
void ring_buffer_iter_reset(struct ring_buffer_iter *iter)
/* Resets the iterator, so that it will start from the beginning again.  */
void ring_buffer_iter_reset(struct ring_buffer_iter *iter)
{
	struct ring_buffer_per_cpu *cpu_buffer;
	unsigned long flags;
	if (!iter)
		return;
	cpu_buffer = iter->cpu_buffer;
	spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
	rb_iter_reset(iter);
	spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags);
}