diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-06-30 15:20:40 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-30 09:32:04 -0600 |
commit | cf2f54255d0342cfbd273cbb964ad6bc7674f587 (patch) | |
tree | 8cb0f93ee06dae7de8abc6b4416f4d71e87082d4 /fs/io_uring.c | |
parent | ab0b6451db2a8ed630b89ef3826b8ea994149444 (diff) | |
download | lwn-cf2f54255d0342cfbd273cbb964ad6bc7674f587.tar.gz lwn-cf2f54255d0342cfbd273cbb964ad6bc7674f587.zip |
io_uring: don't fail iopoll requeue without ->mm
Actually, io_iopoll_queue() may have NULL ->mm, that's if SQ thread
didn't grabbed mm before doing iopoll. Don't fail reqs there, as after
recent changes it won't be punted directly but rather through task_work.
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.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 3c12221f549e..43419f5bef8c 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1902,9 +1902,7 @@ static void io_iopoll_queue(struct list_head *again) do { req = list_first_entry(again, struct io_kiocb, list); list_del(&req->list); - - /* should have ->mm unless io_uring is dying, kill reqs then */ - if (unlikely(!current->mm) || !io_rw_reissue(req, -EAGAIN)) + if (!io_rw_reissue(req, -EAGAIN)) io_complete_rw_common(&req->rw.kiocb, -EAGAIN, NULL); } while (!list_empty(again)); } |