Skip to content

Commit

Permalink
io_uring: don't reuse linked_timeout
Browse files Browse the repository at this point in the history
commit ff57716 upstream.

Clear linked_timeout for next requests in __io_queue_sqe() so we won't
queue it up unnecessary when it's going to be punted.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Cc: stable@vger.kernel.org # v5.9
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
isilence authored and gregkh committed Nov 1, 2020
1 parent 4683c54 commit 753456e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/io_uring.c
Expand Up @@ -6249,8 +6249,10 @@ static void __io_queue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe,
if (nxt) {
req = nxt;

if (req->flags & REQ_F_FORCE_ASYNC)
if (req->flags & REQ_F_FORCE_ASYNC) {
linked_timeout = NULL;
goto punt;
}
goto again;
}
exit:
Expand Down

0 comments on commit 753456e

Please sign in to comment.