summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-10-22 16:47:16 +0100
committerJens Axboe <axboe@kernel.dk>2020-10-23 13:07:11 -0600
commitfeaadc4fc2ebdbd53ffed1735077725855a2af53 (patch)
tree4abe7a954f7581402042d3518720ba6bac704537 /fs/io_uring.c
parentc9abd7ad832b9eef06d887f4971894af5de617fd (diff)
downloadlinux-stable-feaadc4fc2ebdbd53ffed1735077725855a2af53.tar.gz
linux-stable-feaadc4fc2ebdbd53ffed1735077725855a2af53.tar.bz2
linux-stable-feaadc4fc2ebdbd53ffed1735077725855a2af53.zip
io_uring: don't miss setting IO_WQ_WORK_CONCURRENT
Set IO_WQ_WORK_CONCURRENT for all REQ_F_FORCE_ASYNC requests, do that in that is also looks better. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index f6cb2b62ce1a..3606ea572e61 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1365,6 +1365,9 @@ static void io_prep_async_work(struct io_kiocb *req)
io_req_init_async(req);
id = req->work.identity;
+ if (req->flags & REQ_F_FORCE_ASYNC)
+ req->work.flags |= IO_WQ_WORK_CONCURRENT;
+
if (req->flags & REQ_F_ISREG) {
if (def->hash_reg_file || (ctx->flags & IORING_SETUP_IOPOLL))
io_wq_hash_work(&req->work, file_inode(req->file));
@@ -6245,13 +6248,6 @@ fail_req:
if (unlikely(ret))
goto fail_req;
}
-
- /*
- * Never try inline submit of IOSQE_ASYNC is set, go straight
- * to async execution.
- */
- io_req_init_async(req);
- req->work.flags |= IO_WQ_WORK_CONCURRENT;
io_queue_async_work(req);
} else {
if (sqe) {