diff --git a/fs/io_uring.c b/fs/io_uring.c index c7af85102449ceaee777eb2d1f22da35df1ca7c7..b0b3930d7d3ef1e98739d1f6dfb46a82aaf7bc27 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -553,7 +553,8 @@ static struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p) goto err; __hash_init(ctx->cancel_hash, 1U << hash_bits); - if (percpu_ref_init(&ctx->refs, io_ring_ctx_ref_free, 0, GFP_KERNEL)) + if (percpu_ref_init(&ctx->refs, io_ring_ctx_ref_free, + PERCPU_REF_ALLOW_REINIT, GFP_KERNEL)) goto err; ctx->flags = p->flags;