summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-02-09 04:47:35 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-13 13:54:54 +0100
commitfe9334186a50166f4d5f1e9bfedd257d22e6c4a9 (patch)
tree5eeb81d265e8cb0074438b7bdfb93e0c65a415fd /fs
parent2d18b3ee633e0c9d7ddcaa489299113fb88ea672 (diff)
io_uring: simplify io_task_match()
[ Upstream commit 06de5f5973c641c7ae033f133ecfaaf64fe633a6 ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-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 3b6307f6bd93..e08ad562abfb 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1472,11 +1472,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);
}
/*