Skip to content

Commit

Permalink
io_uring: don't reuse linked_timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
isilence authored and axboe committed Oct 21, 2020
1 parent 6922833 commit ff57716
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -6237,8 +6237,10 @@ static void __io_queue_sqe(struct io_kiocb *req, struct io_comp_state *cs)
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 ff57716

Please sign in to comment.