diff options
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -576,7 +576,8 @@ static struct kioctx *ioctx_alloc(unsigned nr_events) | |||
576 | 576 | ||
577 | atomic_set(&ctx->reqs_available, ctx->nr_events - 1); | 577 | atomic_set(&ctx->reqs_available, ctx->nr_events - 1); |
578 | ctx->req_batch = (ctx->nr_events - 1) / (num_possible_cpus() * 4); | 578 | ctx->req_batch = (ctx->nr_events - 1) / (num_possible_cpus() * 4); |
579 | BUG_ON(!ctx->req_batch); | 579 | if (ctx->req_batch < 1) |
580 | ctx->req_batch = 1; | ||
580 | 581 | ||
581 | err = ioctx_add_table(ctx, mm); | 582 | err = ioctx_add_table(ctx, mm); |
582 | if (err) | 583 | if (err) |