Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1 -7
+1 -7
io_uring/rsrc.h
··· 97 97 io_rsrc_node_ref_zero(node); 98 98 } 99 99 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 - 106 100 static inline void __io_req_set_rsrc_node(struct io_kiocb *req, 107 101 struct io_ring_ctx *ctx) 108 102 { 109 103 lockdep_assert_held(&ctx->uring_lock); 110 104 req->rsrc_node = ctx->rsrc_node; 111 - io_charge_rsrc_node(ctx, ctx->rsrc_node); 105 + ctx->rsrc_node->refs++; 112 106 } 113 107 114 108 static inline void io_req_set_rsrc_node(struct io_kiocb *req,