diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-06-03 20:19:10 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-06-16 23:54:55 +0300 |
commit | 60b6c075e8eb8bd23c106e2ab13370a146a94a5b (patch) | |
tree | c0e9290454a312d572705bbb9f6d242a5ba32605 /io_uring/io_uring.h | |
parent | f4eaf8eda89e1ae5d8274297094687245293deff (diff) | |
download | linux-60b6c075e8eb8bd23c106e2ab13370a146a94a5b.tar.xz |
io_uring/eventfd: move to more idiomatic RCU free usage
In some ways, it just "happens to work" currently with using the ops
field for both the free and signaling bit. But it depends on ordering
of operations in terms of freeing and signaling. Clean it up and use the
usual refs == 0 under RCU read side lock to determine if the ev_fd is
still valid, and use the reference to gate the freeing as well.
Fixes: 21a091b970cd ("io_uring: signal registered eventfd to process deferred task work")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r-- | io_uring/io_uring.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index 726e6367af4d..2b08b402b716 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -106,10 +106,10 @@ bool io_match_task_safe(struct io_kiocb *head, struct task_struct *task, enum { IO_EVENTFD_OP_SIGNAL_BIT, - IO_EVENTFD_OP_FREE_BIT, }; -void io_eventfd_ops(struct rcu_head *rcu); +void io_eventfd_do_signal(struct rcu_head *rcu); +void io_eventfd_free(struct rcu_head *rcu); void io_activate_pollwq(struct io_ring_ctx *ctx); static inline void io_lockdep_assert_cq_locked(struct io_ring_ctx *ctx) |