diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-06-22 02:00:35 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-06-22 02:24:37 +0300 |
commit | c487a5ad48831afa6784b368ec40d0ee50f2fe1b (patch) | |
tree | 4092f9a8e46c456e44657dc5bde50f5b551c05ff /fs | |
parent | aacf2f9f382c91df73f33317e28a4c34c8038986 (diff) | |
download | linux-c487a5ad48831afa6784b368ec40d0ee50f2fe1b.tar.xz |
io_uring: fail links when poll fails
Don't forget to cancel all linked requests of poll request when
__io_arm_poll_handler() failed.
Fixes: aa43477b04025 ("io_uring: poll rework")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a78aad962460f9fdfe4aa4c0b62425c88f9415bc.1655852245.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index dffa85d4dc7a..d5ea3c6167b5 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7405,6 +7405,8 @@ static int io_poll_add(struct io_kiocb *req, unsigned int issue_flags) ipt.pt._qproc = io_poll_queue_proc; ret = __io_arm_poll_handler(req, &req->poll, &ipt, poll->events); + if (!ret && ipt.error) + req_set_fail(req); ret = ret ?: ipt.error; if (ret) __io_req_complete(req, issue_flags, ret, 0); |