diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-11-25 16:49:20 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-26 03:56:11 +0100 |
commit | 576a347b7af8abfbddc80783fb6629c2894d036e (patch) | |
tree | b0e84672c7a4fed95d8a00749b25a649fed82548 /fs/io_uring.c | |
parent | io_uring: fix dead-hung for non-iter fixed rw (diff) | |
download | linux-576a347b7af8abfbddc80783fb6629c2894d036e.tar.xz linux-576a347b7af8abfbddc80783fb6629c2894d036e.zip |
io-wq: have io_wq_create() take a 'data' argument
We currently pass in 4 arguments outside of the bounded size. In
preparation for adding one more argument, let's bundle them up in
a struct to make it more readable.
No functional changes in this patch.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index fc832164bbb8..fabae84396bc 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -3962,6 +3962,7 @@ static void io_get_work(struct io_wq_work *work) static int io_sq_offload_start(struct io_ring_ctx *ctx, struct io_uring_params *p) { + struct io_wq_data data; unsigned concurrency; int ret; @@ -4006,10 +4007,14 @@ static int io_sq_offload_start(struct io_ring_ctx *ctx, goto err; } + data.mm = ctx->sqo_mm; + data.user = ctx->user; + data.get_work = io_get_work; + data.put_work = io_put_work; + /* 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, ctx->user, - io_get_work, io_put_work); + ctx->io_wq = io_wq_create(concurrency, &data); if (IS_ERR(ctx->io_wq)) { ret = PTR_ERR(ctx->io_wq); ctx->io_wq = NULL; |