io_uring: allow IORING_OP_ASYNC_CANCEL with 'fd' key
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Apr 2022 03:06:14 +0000 (21:06 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Apr 2022 16:41:03 +0000 (10:41 -0600)
commit70ee5d0c9483764472d0eb85abadf2a08422fd44
treee0e5980223c8b20e6483bcdb421efad84ba9d05f
parent08c10420b0a73429628db63480cf10a58778743c
io_uring: allow IORING_OP_ASYNC_CANCEL with 'fd' key

Currently sqe->addr must contain the user_data of the request being
canceled. Introduce the IORING_ASYNC_CANCEL_FD flag, which tells the
kernel that we're keying off the file fd instead for cancelation. This
allows canceling any request that a) uses a file, and b) was assigned the
file based on the value being passed in.

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