summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-03-25 18:32:44 +0000
committerJens Axboe <axboe@kernel.dk>2021-03-27 14:09:11 -0600
commit2482b58ffbdc80cfaae969ad19cb32803056505b (patch)
tree13bac6e8314411a0c8301af6d9ab1be998bb15ad /fs/io_uring.c
parent80c4cbdb5ee604712e59fe304d7bf084b562f705 (diff)
downloadlwn-2482b58ffbdc80cfaae969ad19cb32803056505b.tar.gz
lwn-2482b58ffbdc80cfaae969ad19cb32803056505b.zip
io_uring: don't cancel-track common timeouts
Don't account usual timeouts (i.e. not linked) as REQ_F_INFLIGHT but keep behaviour prior to dd59a3d595cc1 ("io_uring: reliably cancel linked timeouts"). Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/104441ef5d97e3932113d44501fda0df88656b83.1616696997.git.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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 8498f74595f3..87d198d223a2 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5563,7 +5563,8 @@ static int io_timeout_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe,
data->mode = io_translate_timeout_mode(flags);
hrtimer_init(&data->timer, CLOCK_MONOTONIC, data->mode);
- io_req_track_inflight(req);
+ if (is_timeout_link)
+ io_req_track_inflight(req);
return 0;
}