diff --git a/fs/io_uring.c b/fs/io_uring.c index ea62d3b264af28eca8e3723cad69ec629eaea2f3..3be1678fdd80c6955a510abaa4fb3b0e7c92e3e7 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -3488,8 +3488,9 @@ static int io_sq_offload_start(struct io_ring_ctx *ctx, /* Do QD, or 4 * CPUS, whatever is smallest */ concurrency = min(ctx->sq_entries, 4 * num_online_cpus()); ctx->io_wq = io_wq_create(concurrency, ctx->sqo_mm); - if (!ctx->io_wq) { - ret = -ENOMEM; + if (IS_ERR(ctx->io_wq)) { + ret = PTR_ERR(ctx->io_wq); + ctx->io_wq = NULL; goto err; }