Message ID | 1405459799-14124-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/aio.c b/fs/aio.c index e9566f2..19e7d95 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1049,6 +1049,9 @@ static long aio_read_events_ring(struct kioctx *ctx, if (head == tail) goto out; + head %= ctx->nr_events; + tail %= ctx->nr_events; + while (ret < nr) { long avail; struct io_event *ev;