|
@@ -652,7 +652,8 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
|
|
aio_nr += ctx->max_reqs;
|
|
aio_nr += ctx->max_reqs;
|
|
spin_unlock(&aio_nr_lock);
|
|
spin_unlock(&aio_nr_lock);
|
|
|
|
|
|
- percpu_ref_get(&ctx->users); /* io_setup() will drop this ref */
|
|
|
|
|
|
+ percpu_ref_get(&ctx->users); /* io_setup() will drop this ref */
|
|
|
|
+ percpu_ref_get(&ctx->reqs); /* free_ioctx_users() will drop this */
|
|
|
|
|
|
err = ioctx_add_table(ctx, mm);
|
|
err = ioctx_add_table(ctx, mm);
|
|
if (err)
|
|
if (err)
|