io_uring: fix logic error in io_timeout
authoryangerkun <yangerkun@huawei.com>
Thu, 17 Oct 2019 04:12:35 +0000 (12:12 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Oct 2019 21:49:15 +0000 (15:49 -0600)
commit5f212dcc042b1bb4acd1b201f2a2fbb8bf5fa2eb
tree38025726981ad1b8566e292533e580dafded9132
parentf44d6635e6d887b8353af520abaa80a7ef6a6ac3
io_uring: fix logic error in io_timeout

If ctx->cached_sq_head < nxt_sq_head, we should add UINT_MAX to tmp, not
tmp_nxt.

Fixes: 96c565865bed ("io_uring: consider the overflow of sequence for timeout req")
Signed-off-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c