From ed996449235e5b87ef292dcb91666ed912c7f560 Mon Sep 17 00:00:00 2001 From: Davide Libenzi Date: Thu, 10 Apr 2008 21:29:19 -0700 Subject: [PATCH] --- yaml --- r: 88241 b: refs/heads/master c: 8d1c98b0b5c0148b519c6416e689ef6a89ffcea3 h: refs/heads/master i: 88239: 74ee94e2e5bd90fa90a45baf2e1e5393add90f64 v: v3 --- [refs] | 2 +- trunk/fs/aio.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 3c181b527fa0..af0b8991a50e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d479540dbaba6f7acdb48e0242fee868c7a68116 +refs/heads/master: 8d1c98b0b5c0148b519c6416e689ef6a89ffcea3 diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index 60a4cd4d1137..228368610dfa 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -936,14 +936,6 @@ int aio_complete(struct kiocb *iocb, long res, long res2) return 1; } - /* - * Check if the user asked us to deliver the result through an - * eventfd. The eventfd_signal() function is safe to be called - * from IRQ context. - */ - if (!IS_ERR(iocb->ki_eventfd)) - eventfd_signal(iocb->ki_eventfd, 1); - info = &ctx->ring_info; /* add a completion event to the ring buffer. @@ -992,6 +984,15 @@ int aio_complete(struct kiocb *iocb, long res, long res2) kunmap_atomic(ring, KM_IRQ1); pr_debug("added to ring %p at [%lu]\n", iocb, tail); + + /* + * Check if the user asked us to deliver the result through an + * eventfd. The eventfd_signal() function is safe to be called + * from IRQ context. + */ + if (!IS_ERR(iocb->ki_eventfd)) + eventfd_signal(iocb->ki_eventfd, 1); + put_rq: /* everything turned out well, dispose of the aiocb. */ ret = __aio_put_req(ctx, iocb);