X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Faio.c;h=5e00f15c54aa24e01c30759b446326c2d89b6ede;hb=2a86cb7c2b1e9eb98b36d0a3cf4444d8851968b1;hp=8c8f6c5b6d7930657f7a3aadf44fe4b4dc96b738;hpb=82279e6bd7643da1b3fbda42555c3238c7b00d38;p=karo-tx-linux.git diff --git a/fs/aio.c b/fs/aio.c index 8c8f6c5b6d79..5e00f15c54aa 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -798,29 +798,12 @@ static void aio_queue_work(struct kioctx * ctx) queue_delayed_work(aio_wq, &ctx->wq, timeout); } - -/* - * aio_run_iocbs: - * Process all pending retries queued on the ioctx - * run list. - * Assumes it is operating within the aio issuer's mm - * context. - */ -static inline void aio_run_iocbs(struct kioctx *ctx) -{ - int requeue; - - spin_lock_irq(&ctx->ctx_lock); - - requeue = __aio_run_iocbs(ctx); - spin_unlock_irq(&ctx->ctx_lock); - if (requeue) - aio_queue_work(ctx); -} - /* - * just like aio_run_iocbs, but keeps running them until - * the list stays empty + * aio_run_all_iocbs: + * Process all pending retries queued on the ioctx + * run list, and keep running them until the list + * stays empty. + * Assumes it is operating within the aio issuer's mm context. */ static inline void aio_run_all_iocbs(struct kioctx *ctx) { @@ -1839,7 +1822,7 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id, long ret = -EINVAL; if (likely(ioctx)) { - if (likely(min_nr <= nr && min_nr >= 0 && nr >= 0)) + if (likely(min_nr <= nr && min_nr >= 0)) ret = read_events(ioctx, min_nr, nr, events, timeout); put_ioctx(ioctx); }