Commit d8e9214f authored by Dylan Yudaken's avatar Dylan Yudaken Committed by Jens Axboe

io_uring: move io_eventfd_put

Non functional change: move this function above io_eventfd_signal so it
can be used from there
Signed-off-by: default avatarDylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220830125013.570060-6-dylany@fb.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c0e0d6ba
...@@ -478,6 +478,14 @@ static __cold void io_queue_deferred(struct io_ring_ctx *ctx) ...@@ -478,6 +478,14 @@ static __cold void io_queue_deferred(struct io_ring_ctx *ctx)
} }
} }
static void io_eventfd_put(struct rcu_head *rcu)
{
struct io_ev_fd *ev_fd = container_of(rcu, struct io_ev_fd, rcu);
eventfd_ctx_put(ev_fd->cq_ev_fd);
kfree(ev_fd);
}
static void io_eventfd_signal(struct io_ring_ctx *ctx) static void io_eventfd_signal(struct io_ring_ctx *ctx)
{ {
struct io_ev_fd *ev_fd; struct io_ev_fd *ev_fd;
...@@ -2469,14 +2477,6 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg, ...@@ -2469,14 +2477,6 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg,
return 0; return 0;
} }
static void io_eventfd_put(struct rcu_head *rcu)
{
struct io_ev_fd *ev_fd = container_of(rcu, struct io_ev_fd, rcu);
eventfd_ctx_put(ev_fd->cq_ev_fd);
kfree(ev_fd);
}
static int io_eventfd_unregister(struct io_ring_ctx *ctx) static int io_eventfd_unregister(struct io_ring_ctx *ctx)
{ {
struct io_ev_fd *ev_fd; struct io_ev_fd *ev_fd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment