Skip to content

Commit c29006a

Browse files
isilenceaxboe
authored andcommitted
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: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a195bc78ac3d2c6fbaea72976e982fe51e50ecdd.1712331455.git.asml.silence@gmail.com Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent d9713ad commit c29006a

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

io_uring/io_uring.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,10 +1449,9 @@ static void io_free_batch_list(struct io_ring_ctx *ctx,
14491449
io_clean_op(req);
14501450
}
14511451
io_put_file(req);
1452-
1453-
io_req_put_rsrc_locked(req, ctx);
1454-
1452+
io_put_rsrc_node(ctx, req->rsrc_node);
14551453
io_put_task(req->task);
1454+
14561455
node = req->comp_list.next;
14571456
io_req_add_to_cache(req, ctx);
14581457
} while (node);

io_uring/rsrc.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@ static inline void io_put_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node
8383
io_rsrc_node_ref_zero(node);
8484
}
8585

86-
static inline void io_req_put_rsrc_locked(struct io_kiocb *req,
87-
struct io_ring_ctx *ctx)
88-
{
89-
io_put_rsrc_node(ctx, req->rsrc_node);
90-
}
91-
9286
static inline void io_charge_rsrc_node(struct io_ring_ctx *ctx,
9387
struct io_rsrc_node *node)
9488
{

0 commit comments

Comments
 (0)