]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring: make ASYNC_CANCEL work with poll and timeout
authorJens Axboe <axboe@kernel.dk>
Sun, 10 Nov 2019 00:43:02 +0000 (17:43 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 11 Nov 2019 23:33:05 +0000 (16:33 -0700)
commit47f467686ec02fc07fd5c6bb34b6f6736e2884b0
treef02777df3aed90654797c516f6b15a074e029b0e
parent0ddf92e848ab7abf216f218ee363eb9b9650e98f
io_uring: make ASYNC_CANCEL work with poll and timeout

It's a little confusing that we have multiple types of command
cancellation opcodes now that we have a generic one. Make the generic
one work with POLL_ADD and TIMEOUT commands as well, that makes for an
easier to use API for the application. The fact that they currently
don't is a bit confusing.

Add a helper that takes care of it, so we can user it from both
IORING_OP_ASYNC_CANCEL and from the linked timeout cancellation.

Reported-by: Hrvoje Zeba <zeba.hrvoje@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c