Commit 29b26c55 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

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: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/791e8edd28d78797240b74d34e99facbaad62f3b.1681822823.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4130b499
...@@ -140,14 +140,14 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_mapped_ubuf **slo ...@@ -140,14 +140,14 @@ static void io_buffer_unmap(struct io_ring_ctx *ctx, struct io_mapped_ubuf **slo
*slot = NULL; *slot = NULL;
} }
static void io_rsrc_put_work(struct io_rsrc_data *rsrc_data, static void io_rsrc_put_work(struct io_rsrc_node *node)
struct io_rsrc_put *prsrc)
{ {
struct io_ring_ctx *ctx = rsrc_data->ctx; struct io_rsrc_data *data = node->rsrc_data;
struct io_rsrc_put *prsrc = &node->item;
if (prsrc->tag) if (prsrc->tag)
io_post_aux_cqe(ctx, prsrc->tag, 0, 0); io_post_aux_cqe(data->ctx, prsrc->tag, 0, 0);
rsrc_data->do_put(ctx, prsrc); data->do_put(data->ctx, prsrc);
} }
void io_rsrc_node_destroy(struct io_ring_ctx *ctx, struct io_rsrc_node *node) 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) ...@@ -170,7 +170,7 @@ void io_rsrc_node_ref_zero(struct io_rsrc_node *node)
list_del(&node->node); list_del(&node->node);
if (likely(!node->empty)) if (likely(!node->empty))
io_rsrc_put_work(node->rsrc_data, &node->item); io_rsrc_put_work(node);
io_rsrc_node_destroy(ctx, node); io_rsrc_node_destroy(ctx, node);
} }
if (list_empty(&ctx->rsrc_ref_list) && unlikely(ctx->rsrc_quiesce)) if (list_empty(&ctx->rsrc_ref_list) && unlikely(ctx->rsrc_quiesce))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment