diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-06-30 15:20:41 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-30 09:32:04 -0600 |
commit | ea1164e574e9af0a15ab730ead0861a4c7724142 (patch) | |
tree | 8b40ae3a32753a378a024bf3d984416ee766b1dc /fs | |
parent | cf2f54255d0342cfbd273cbb964ad6bc7674f587 (diff) | |
download | lwn-ea1164e574e9af0a15ab730ead0861a4c7724142.tar.gz lwn-ea1164e574e9af0a15ab730ead0861a4c7724142.zip |
io_uring: fix NULL mm in io_poll_task_func()
io_poll_task_func() hand-coded link submission forgetting to set
TASK_RUNNING, acquire mm, etc. Call existing helper for that,
i.e. __io_req_task_submit().
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 43419f5bef8c..2c17c2613205 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4518,13 +4518,8 @@ static void io_poll_task_func(struct callback_head *cb) struct io_kiocb *nxt = NULL; io_poll_task_handler(req, &nxt); - if (nxt) { - struct io_ring_ctx *ctx = nxt->ctx; - - mutex_lock(&ctx->uring_lock); - __io_queue_sqe(nxt, NULL, NULL); - mutex_unlock(&ctx->uring_lock); - } + if (nxt) + __io_req_task_submit(nxt); } static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode, |