Skip to content

Commit 29b26c5

Browse files
isilenceaxboe
authored andcommitted
io_uring/rsrc: pass node to io_rsrc_put_work()
Instead of passing rsrc_data and a resource to io_rsrc_put_work() just forward node, that's all the function needs. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/791e8edd28d78797240b74d34e99facbaad62f3b.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 4130b49 commit 29b26c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

io_uring/rsrc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_mapped_ubuf **slo
140140
*slot = NULL;
141141
}
142142

143-
static void io_rsrc_put_work(struct io_rsrc_data *rsrc_data,
144-
struct io_rsrc_put *prsrc)
143+
static void io_rsrc_put_work(struct io_rsrc_node *node)
145144
{
146-
struct io_ring_ctx *ctx = rsrc_data->ctx;
145+
struct io_rsrc_data *data = node->rsrc_data;
146+
struct io_rsrc_put *prsrc = &node->item;
147147

148148
if (prsrc->tag)
149-
io_post_aux_cqe(ctx, prsrc->tag, 0, 0);
150-
rsrc_data->do_put(ctx, prsrc);
149+
io_post_aux_cqe(data->ctx, prsrc->tag, 0, 0);
150+
data->do_put(data->ctx, prsrc);
151151
}
152152

153153
void io_rsrc_node_destroy(struct io_ring_ctx *ctx, struct io_rsrc_node *node)
@@ -170,7 +170,7 @@ void io_rsrc_node_ref_zero(struct io_rsrc_node *node)
170170
list_del(&node->node);
171171

172172
if (likely(!node->empty))
173-
io_rsrc_put_work(node->rsrc_data, &node->item);
173+
io_rsrc_put_work(node);
174174
io_rsrc_node_destroy(ctx, node);
175175
}
176176
if (list_empty(&ctx->rsrc_ref_list) && unlikely(ctx->rsrc_quiesce))

0 commit comments

Comments
 (0)