ublk: don't get ublk device reference in ublk_abort_queue()
[linux-block.git] / io_uring / cancel.h
CommitLineData
7aaff708
JA
1// SPDX-License-Identifier: GPL-2.0
2
ad163a7e
JA
3#include <linux/io_uring_types.h>
4
5struct io_cancel_data {
6 struct io_ring_ctx *ctx;
7 union {
8 u64 data;
9 struct file *file;
10 };
d7b8b079 11 u8 opcode;
ad163a7e
JA
12 u32 flags;
13 int seq;
14};
15
7aaff708
JA
16int io_async_cancel_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
17int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags);
18
88f52eaa 19int io_try_cancel(struct io_uring_task *tctx, struct io_cancel_data *cd,
5d7943d9 20 unsigned int issue_flags);
e6f89be6 21void init_hash_table(struct io_hash_table *table, unsigned size);
78a861b9
JA
22
23int io_sync_cancel(struct io_ring_ctx *ctx, void __user *arg);
aa5cd116 24bool io_cancel_req_match(struct io_kiocb *req, struct io_cancel_data *cd);