mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
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: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
2846c481c9
commit
06de5f5973
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user