]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix sequence logic for timeout requests
authorJens Axboe <axboe@kernel.dk>
Fri, 11 Oct 2019 03:42:58 +0000 (21:42 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Oct 2019 03:42:58 +0000 (21:42 -0600)
commit1707dce1013fe6dac4dace7a7a7c87690061c0c6
tree597a5b5135c729f046493e2da0c74d4378058014
parent363641038cfcdd96012e956e42e645213a4bc00e
io_uring: fix sequence logic for timeout requests

We have two ways a request can be deferred:

1) It's a regular request that depends on another one
2) It's a timeout that tracks completions

We have a shared helper to determine whether to defer, and that
attempts to make the right decision based on the request. But we
only have some of this information in the caller. Un-share the
two timeout/defer helpers so the caller can use the right one.

Fixes: 36d5eeec0e99 ("io_uring: IORING_OP_TIMEOUT support")
Reported-by: yangerkun <yangerkun@huawei.com>
Reviewed-by: Jackie Liu <liuyun01@kylinos.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c