OSDN Git Service

io_uring: correct poll cancel and linked timeout expiration completion
authorJens Axboe <axboe@kernel.dk>
Mon, 18 Nov 2019 19:14:54 +0000 (12:14 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Nov 2019 02:56:05 +0000 (19:56 -0700)
commitb0dd8a412699afe3420a08f841333f3474ad45c5
treea37efea0c53bb299335da5d06f35f05c8b9854e7
parente0e328c4b330712e45ba799dc589bda751323110
io_uring: correct poll cancel and linked timeout expiration completion

Currently a poll request fills a completion entry of 0, even if it got
cancelled. This is odd, and it makes it harder to support with chains.
Ensure that it returns -ECANCELED in the completions events if it got
cancelled, and furthermore ensure that the linked timeout that triggered
it completes with -ETIME if we did indeed trigger the completions
through a timeout.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c