Skip to content

Commit

Permalink
io_uring: don't fail iopoll requeue without ->mm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Jun 30, 2020
1 parent ab0b645 commit cf2f542
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit cf2f542

Please sign in to comment.