Skip to content

Commit e410ffc

Browse files
committed
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 <[email protected]>
1 parent 743fb58 commit e410ffc

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

io_uring/rsrc.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,12 @@ static inline void io_put_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node
9797
io_rsrc_node_ref_zero(node);
9898
}
9999

100-
static inline void io_charge_rsrc_node(struct io_ring_ctx *ctx,
101-
struct io_rsrc_node *node)
102-
{
103-
node->refs++;
104-
}
105-
106100
static inline void __io_req_set_rsrc_node(struct io_kiocb *req,
107101
struct io_ring_ctx *ctx)
108102
{
109103
lockdep_assert_held(&ctx->uring_lock);
110104
req->rsrc_node = ctx->rsrc_node;
111-
io_charge_rsrc_node(ctx, ctx->rsrc_node);
105+
ctx->rsrc_node->refs++;
112106
}
113107

114108
static inline void io_req_set_rsrc_node(struct io_kiocb *req,

0 commit comments

Comments
 (0)