io_uring: don't reuse linked_timeout
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 20 Oct 2020 22:50:27 +0000 (23:50 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Oct 2020 22:37:56 +0000 (16:37 -0600)
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>
fs/io_uring.c

index aeef02b..8fffcf4 100644 (file)
@@ -6237,8 +6237,10 @@ punt:
        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: