]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
io_uring/rsrc: kill io_charge_rsrc_node()
authorJens Axboe <axboe@kernel.dk>
Mon, 28 Oct 2024 14:41:24 +0000 (08:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 Oct 2024 19:43:28 +0000 (13:43 -0600)
It's only used from __io_req_set_rsrc_node(), and it takes both the ctx
and node itself, while never using the ctx. Just open-code the basic
refs++ in __io_req_set_rsrc_node() instead.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.h

index e072fb3ee35100208302d4b243545e899465189f..1589c97400831228dc41c2cd65e3f1557f194093 100644 (file)
@@ -97,18 +97,12 @@ static inline void io_put_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node
                io_rsrc_node_ref_zero(node);
 }
 
-static inline void io_charge_rsrc_node(struct io_ring_ctx *ctx,
-                                      struct io_rsrc_node *node)
-{
-       node->refs++;
-}
-
 static inline void __io_req_set_rsrc_node(struct io_kiocb *req,
                                          struct io_ring_ctx *ctx)
 {
        lockdep_assert_held(&ctx->uring_lock);
        req->rsrc_node = ctx->rsrc_node;
-       io_charge_rsrc_node(ctx, ctx->rsrc_node);
+       ctx->rsrc_node->refs++;
 }
 
 static inline void io_req_set_rsrc_node(struct io_kiocb *req,