Message ID | 1404204711-9150-1-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/aio.c b/fs/aio.c index 48f02745b876..618021906aa9 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -719,6 +719,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;