summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-10-28 08:41:24 -0600
committerJens Axboe <axboe@kernel.dk>2024-10-29 13:43:28 -0600
commite410ffca588691e36d5449a5bf521a1a7b712911 (patch)
treeb100eb83e066ea357f1022b4238f1695a60887ce
parent743fb58a35cde8fe27b07ee5a985ae76563845e3 (diff)
io_uring/rsrc: kill io_charge_rsrc_node()
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>
-rw-r--r--io_uring/rsrc.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h
index e072fb3ee351..1589c9740083 100644
--- a/io_uring/rsrc.h
+++ b/io_uring/rsrc.h
@@ -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,