Skip to content

Commit

Permalink
io_uring: remove current check from complete_post
Browse files Browse the repository at this point in the history
task_work execution is now always locked, and we shouldn't get into
io_req_complete_post() from them. That means that complete_post() is
always called out of the original task context and we don't even need to
check current.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/24ec27f27db0d8f58c974d8118dca1d345314ddc.1710799188.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Apr 15, 2024
1 parent 902ce82 commit 23fbdde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io_uring/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags)
{
struct io_ring_ctx *ctx = req->ctx;

if (ctx->task_complete && ctx->submitter_task != current) {
if (ctx->task_complete) {
req->io_task_work.func = io_req_task_complete;
io_req_task_work_add(req);
} else if (!(issue_flags & IO_URING_F_UNLOCKED) ||
Expand Down

0 comments on commit 23fbdde

Please sign in to comment.