summaryrefslogtreecommitdiff
path: root/io_uring/cancel.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-06-16 10:22:10 +0100
committerJens Axboe <axboe@kernel.dk>2022-07-24 18:39:13 -0600
commite6f89be61410ff5a0e690d87d7a308e81f0f5a71 (patch)
treead02b7970896cd600e7aceae3800197316d16d2f /io_uring/cancel.h
parenta2cdd5193218c557b4ee7828017cce83f251e99a (diff)
io_uring: introduce a struct for hash table
Instead of passing around a pointer to hash buckets, add a bit of type safety and wrap it into a structure. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d65bc3faba537ec2aca9eabf334394936d44bd28.1655371007.git.asml.silence@gmail.com Reviewed-by: Hao Xu <howeyxu@tencent.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/cancel.h')
-rw-r--r--io_uring/cancel.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/io_uring/cancel.h b/io_uring/cancel.h
index 556a7dcf160e..fd4cb1a2595d 100644
--- a/io_uring/cancel.h
+++ b/io_uring/cancel.h
@@ -4,9 +4,4 @@ int io_async_cancel_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags);
int io_try_cancel(struct io_kiocb *req, struct io_cancel_data *cd);
-void init_hash_table(struct io_hash_bucket *hash_table, unsigned size);
-
-struct io_hash_bucket {
- spinlock_t lock;
- struct hlist_head list;
-} ____cacheline_aligned_in_smp;
+void init_hash_table(struct io_hash_table *table, unsigned size);