From aa5cd116f3c25c05e4724d7b5e24dc9ed9020a12 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 23 Jun 2023 09:00:24 -0600 Subject: io_uring/cancel: abstract out request match helper We have different match code in a variety of spots. Start the cleanup of this by abstracting out a helper that can be used to check if a given request matches the cancelation criteria outlined in io_cancel_data. Signed-off-by: Jens Axboe --- io_uring/cancel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'io_uring/cancel.h') diff --git a/io_uring/cancel.h b/io_uring/cancel.h index 6a59ee484d0c..496ce4dac78e 100644 --- a/io_uring/cancel.h +++ b/io_uring/cancel.h @@ -21,3 +21,4 @@ int io_try_cancel(struct io_uring_task *tctx, struct io_cancel_data *cd, void init_hash_table(struct io_hash_table *table, unsigned size); int io_sync_cancel(struct io_ring_ctx *ctx, void __user *arg); +bool io_cancel_req_match(struct io_kiocb *req, struct io_cancel_data *cd); -- cgit v1.2.3