diff --git a/[refs] b/[refs] index 1c8fab1241cc..ace341c9fa57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9ff785e4437c83d2179161e012f5bdfbd6381f0 +refs/heads/master: 03e04f048d2774aabd126fbad84729d4ba9dc40a diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index 3fcdd73b6f1b..7fe5bdee1630 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -307,7 +307,9 @@ static void free_ioctx(struct kioctx *ctx) kunmap_atomic(ring); while (atomic_read(&ctx->reqs_active) > 0) { - wait_event(ctx->wait, head != ctx->tail); + wait_event(ctx->wait, + head != ctx->tail || + atomic_read(&ctx->reqs_active) <= 0); avail = (head <= ctx->tail ? ctx->tail : ctx->nr_events) - head;