rk3368 lcdc: update deflick config for interlace mode ouput
[firefly-linux-kernel-4.4.55.git] / fs / aio.c
index 8d2c997a550c823315202c400fc645320262a4e3..ded94c4fa30d31a6997625d007548d119c2aa75d 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -717,6 +717,8 @@ static long aio_read_events_ring(struct kioctx *ctx,
        if (head == ctx->tail)
                goto out;
 
+       head %= ctx->nr_events;
+
        while (ret < nr) {
                long avail;
                struct io_event *ev;