diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-18 02:56:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-18 02:56:30 -0400 |
commit | 1e42198609d73ed1a9adcba2af275c24c2678420 (patch) | |
tree | 32fd4d9073bfc0f3909af8f9fb4bcff38951d01a /fs/aio.c | |
parent | 794eb6bf20ebf992c040ea831cd3a9c64b0c1f7a (diff) | |
parent | 4b119e21d0c66c22e8ca03df05d9de623d0eb50f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -936,14 +936,6 @@ int aio_complete(struct kiocb *iocb, long res, long res2) | |||
936 | return 1; | 936 | return 1; |
937 | } | 937 | } |
938 | 938 | ||
939 | /* | ||
940 | * Check if the user asked us to deliver the result through an | ||
941 | * eventfd. The eventfd_signal() function is safe to be called | ||
942 | * from IRQ context. | ||
943 | */ | ||
944 | if (!IS_ERR(iocb->ki_eventfd)) | ||
945 | eventfd_signal(iocb->ki_eventfd, 1); | ||
946 | |||
947 | info = &ctx->ring_info; | 939 | info = &ctx->ring_info; |
948 | 940 | ||
949 | /* add a completion event to the ring buffer. | 941 | /* add a completion event to the ring buffer. |
@@ -992,6 +984,15 @@ int aio_complete(struct kiocb *iocb, long res, long res2) | |||
992 | kunmap_atomic(ring, KM_IRQ1); | 984 | kunmap_atomic(ring, KM_IRQ1); |
993 | 985 | ||
994 | pr_debug("added to ring %p at [%lu]\n", iocb, tail); | 986 | pr_debug("added to ring %p at [%lu]\n", iocb, tail); |
987 | |||
988 | /* | ||
989 | * Check if the user asked us to deliver the result through an | ||
990 | * eventfd. The eventfd_signal() function is safe to be called | ||
991 | * from IRQ context. | ||
992 | */ | ||
993 | if (!IS_ERR(iocb->ki_eventfd)) | ||
994 | eventfd_signal(iocb->ki_eventfd, 1); | ||
995 | |||
995 | put_rq: | 996 | put_rq: |
996 | /* everything turned out well, dispose of the aiocb. */ | 997 | /* everything turned out well, dispose of the aiocb. */ |
997 | ret = __aio_put_req(ctx, iocb); | 998 | ret = __aio_put_req(ctx, iocb); |
@@ -1790,6 +1791,7 @@ asmlinkage long sys_io_getevents(aio_context_t ctx_id, | |||
1790 | put_ioctx(ioctx); | 1791 | put_ioctx(ioctx); |
1791 | } | 1792 | } |
1792 | 1793 | ||
1794 | asmlinkage_protect(5, ret, ctx_id, min_nr, nr, events, timeout); | ||
1793 | return ret; | 1795 | return ret; |
1794 | } | 1796 | } |
1795 | 1797 | ||