When completing to read a subbuffer, ensure that the state of the
iterator is moved forward so the "put_subbuf" is performed before
returning to the user, so poll() will not return POLLIN when there
is actually no data available to read.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ia94b5dcb0c72d8548325b1004f214044f50fd191
}
read_count += copy_len;
}
- return read_count;
+ goto put_record;
nodata:
*ppos = 0;
chan->iter.len_left = 0;
+
+put_record:
+ lib_ring_buffer_put_current_record(buf);
return read_count;
}