]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/aio.c
eventfd/kaio integration fix
[linux-2.6-omap-h63xx.git] / fs / aio.c
index 60a4cd4d11376a3688f822d3ce30798717833a19..228368610dfa64e7af06ec9dd864074cf550851e 100644 (file)
--- a/fs/aio.c
+++ b/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);