X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=fs%2Faio.c;h=8a37dbbf3437cb78021c22c608dc8beb4cbe2788;hb=14e11e106bf90c52c69373ac6abd3a494918808f;hp=f12db415c0f6aa7b2776bdbcec1279a35c17da7f;hpb=0c326331c8b107abc0a160e8899d749150b8f76a;p=linux-2.6-omap-h63xx.git diff --git a/fs/aio.c b/fs/aio.c index f12db415c0f..8a37dbbf343 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -397,7 +397,7 @@ void fastcall __put_ioctx(struct kioctx *ctx) * This prevents races between the aio code path referencing the * req (after submitting it) and aio_complete() freeing the req. */ -static struct kiocb *FASTCALL(__aio_get_req(struct kioctx *ctx)); +static struct kiocb *__aio_get_req(struct kioctx *ctx); static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx) { struct kiocb *req = NULL; @@ -1161,7 +1161,12 @@ retry: ret = 0; if (to.timed_out) /* Only check after read evt */ break; - io_schedule(); + /* Try to only show up in io wait if there are ops + * in flight */ + if (ctx->reqs_active) + io_schedule(); + else + schedule(); if (signal_pending(tsk)) { ret = -EINTR; break;