diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -978,7 +978,8 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2) | |||
978 | 978 | ||
979 | tail = info->tail; | 979 | tail = info->tail; |
980 | event = aio_ring_event(info, tail, KM_IRQ0); | 980 | event = aio_ring_event(info, tail, KM_IRQ0); |
981 | tail = (tail + 1) % info->nr; | 981 | if (++tail >= info->nr) |
982 | tail = 0; | ||
982 | 983 | ||
983 | event->obj = (u64)(unsigned long)iocb->ki_obj.user; | 984 | event->obj = (u64)(unsigned long)iocb->ki_obj.user; |
984 | event->data = iocb->ki_user_data; | 985 | event->data = iocb->ki_user_data; |