summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-11-06 13:00:21 +0000
committerJens Axboe <axboe@kernel.dk>2020-12-09 12:04:00 -0700
commit06de5f5973c641c7ae033f133ecfaaf64fe633a6 (patch)
tree6b67091a5b2b13f50c0d9b26c53884d12270cf39 /fs/io_uring.c
parent2846c481c9dd1f1fb504b4885bcb815c311df532 (diff)
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>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 12a213b147c0..baff81313f54 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -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);
}
/*