Skip to content

Commit 61500bf

Browse files
isilencegregkh
authored andcommitted
io_uring: don't miss setting IO_WQ_WORK_CONCURRENT
[ Upstream commit feaadc4 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 99a1699 commit 61500bf

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

fs/io_uring.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,9 @@ static void io_prep_async_work(struct io_kiocb *req)
11401140

11411141
io_req_init_async(req);
11421142

1143+
if (req->flags & REQ_F_FORCE_ASYNC)
1144+
req->work.flags |= IO_WQ_WORK_CONCURRENT;
1145+
11431146
if (req->flags & REQ_F_ISREG) {
11441147
if (def->hash_reg_file || (req->ctx->flags & IORING_SETUP_IOPOLL))
11451148
io_wq_hash_work(&req->work, file_inode(req->file));
@@ -6281,13 +6284,6 @@ static void io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe,
62816284
if (unlikely(ret))
62826285
goto fail_req;
62836286
}
6284-
6285-
/*
6286-
* Never try inline submit of IOSQE_ASYNC is set, go straight
6287-
* to async execution.
6288-
*/
6289-
io_req_init_async(req);
6290-
req->work.flags |= IO_WQ_WORK_CONCURRENT;
62916287
io_queue_async_work(req);
62926288
} else {
62936289
__io_queue_sqe(req, sqe, cs);

0 commit comments

Comments
 (0)