提交 06de5f59 编写于 作者: P Pavel Begunkov 提交者: Jens Axboe

io_uring: simplify io_task_match()

If IORING_SETUP_SQPOLL is set all requests belong to the corresponding
SQPOLL task, so skip task checking in that case and always match.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 2846c481
......@@ -1563,11 +1563,7 @@ static bool io_task_match(struct io_kiocb *req, struct task_struct *tsk)
if (!tsk || req->task == tsk)
return true;
if (ctx->flags & IORING_SETUP_SQPOLL) {
if (ctx->sq_data && req->task == ctx->sq_data->thread)
return true;
}
return false;
return (ctx->flags & IORING_SETUP_SQPOLL);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册