Commit c29006a2 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: remove io_req_put_rsrc_locked()

io_req_put_rsrc_locked() is a weird shim function around
io_req_put_rsrc(). All calls to io_req_put_rsrc() require holding
->uring_lock, so we can just use it directly.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/a195bc78ac3d2c6fbaea72976e982fe51e50ecdd.1712331455.git.asml.silence@gmail.comReviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d9713ad3
...@@ -1449,10 +1449,9 @@ static void io_free_batch_list(struct io_ring_ctx *ctx, ...@@ -1449,10 +1449,9 @@ static void io_free_batch_list(struct io_ring_ctx *ctx,
io_clean_op(req); io_clean_op(req);
} }
io_put_file(req); io_put_file(req);
io_put_rsrc_node(ctx, req->rsrc_node);
io_req_put_rsrc_locked(req, ctx);
io_put_task(req->task); io_put_task(req->task);
node = req->comp_list.next; node = req->comp_list.next;
io_req_add_to_cache(req, ctx); io_req_add_to_cache(req, ctx);
} while (node); } while (node);
......
...@@ -83,12 +83,6 @@ static inline void io_put_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node ...@@ -83,12 +83,6 @@ static inline void io_put_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node
io_rsrc_node_ref_zero(node); io_rsrc_node_ref_zero(node);
} }
static inline void io_req_put_rsrc_locked(struct io_kiocb *req,
struct io_ring_ctx *ctx)
{
io_put_rsrc_node(ctx, req->rsrc_node);
}
static inline void io_charge_rsrc_node(struct io_ring_ctx *ctx, static inline void io_charge_rsrc_node(struct io_ring_ctx *ctx,
struct io_rsrc_node *node) struct io_rsrc_node *node)
{ {
......
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