X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Faio.c;h=9dec7d2d546e0e12e200898993f1b272111f5cee;hb=e00ba3dae077f54cfd2af42e939a618caa7a3bca;hp=f12db415c0f6aa7b2776bdbcec1279a35c17da7f;hpb=70180659a479b55387eca8cc1fa7024ba8410b14;p=linux-2.6 diff --git a/fs/aio.c b/fs/aio.c index f12db415c0..9dec7d2d54 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -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;