On 6/6/22 07:57, Hao Xu wrote:
From: Hao Xu <howeyxu@xxxxxxxxxxx>
Add a new io_hash_bucket structure so that each bucket in cancel_hash
has separate spinlock. This is a prep patch for later use.
Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx>
---
io_uring/cancel.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/io_uring/cancel.h b/io_uring/cancel.h
index 4f35d8696325..b9218310611c 100644
--- a/io_uring/cancel.h
+++ b/io_uring/cancel.h
@@ -4,3 +4,8 @@ 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);
+
+struct io_hash_bucket {
+ spinlock_t lock;
+ struct hlist_head list;
+};
please, in future just merge such patches into the next one,
separately it doesn't do anything meaningful, the struct is
not used here and IMHO only makes reviewing harder.
--
Pavel Begunkov