From c24160c8af43f79da6497f6155faeacdae7fe5b5 Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Sun, 1 May 2005 08:59:15 -0700 Subject: [PATCH] --- yaml --- r: 749 b: refs/heads/master c: 4bf69b2a06090c01c27f25ea5cd1440f7bf9256f h: refs/heads/master i: 747: cf4628e6e338bc1be408ba46fc0855caf9ef479a v: v3 --- [refs] | 2 +- trunk/fs/aio.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b614b166e733..2f67a2993af3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 212079cf4ee99e492a57b817e796825d423a30bb +refs/heads/master: 4bf69b2a06090c01c27f25ea5cd1440f7bf9256f diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index 9f807a541fbe..40517f35daae 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -978,7 +978,8 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2) tail = info->tail; event = aio_ring_event(info, tail, KM_IRQ0); - tail = (tail + 1) % info->nr; + if (++tail >= info->nr) + tail = 0; event->obj = (u64)(unsigned long)iocb->ki_obj.user; event->data = iocb->ki_user_data;