mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
io_uring/timeout: don't export link t-out disarm helper
[__]io_disarm_linked_timeout() are only used inside timeout.c. so confine them inside the file. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/1eb200911255e643bf252a8e65fb2c787340cf18.1746533800.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
a5c98e9424
commit
78967aabf6
2 changed files with 8 additions and 16 deletions
|
@ -35,6 +35,9 @@ struct io_timeout_rem {
|
|||
bool ltimeout;
|
||||
};
|
||||
|
||||
static struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req,
|
||||
struct io_kiocb *link);
|
||||
|
||||
static inline bool io_is_timeout_noseq(struct io_kiocb *req)
|
||||
{
|
||||
struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout);
|
||||
|
@ -218,7 +221,9 @@ void io_disarm_next(struct io_kiocb *req)
|
|||
struct io_ring_ctx *ctx = req->ctx;
|
||||
|
||||
raw_spin_lock_irq(&ctx->timeout_lock);
|
||||
link = io_disarm_linked_timeout(req);
|
||||
if (req->link && req->link->opcode == IORING_OP_LINK_TIMEOUT)
|
||||
link = __io_disarm_linked_timeout(req, req->link);
|
||||
|
||||
raw_spin_unlock_irq(&ctx->timeout_lock);
|
||||
if (link)
|
||||
io_req_queue_tw_complete(link, -ECANCELED);
|
||||
|
@ -228,8 +233,8 @@ void io_disarm_next(struct io_kiocb *req)
|
|||
io_fail_links(req);
|
||||
}
|
||||
|
||||
struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req,
|
||||
struct io_kiocb *link)
|
||||
static struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req,
|
||||
struct io_kiocb *link)
|
||||
__must_hold(&req->ctx->completion_lock)
|
||||
__must_hold(&req->ctx->timeout_lock)
|
||||
{
|
||||
|
|
|
@ -8,19 +8,6 @@ struct io_timeout_data {
|
|||
u32 flags;
|
||||
};
|
||||
|
||||
struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req,
|
||||
struct io_kiocb *link);
|
||||
|
||||
static inline struct io_kiocb *io_disarm_linked_timeout(struct io_kiocb *req)
|
||||
{
|
||||
struct io_kiocb *link = req->link;
|
||||
|
||||
if (link && link->opcode == IORING_OP_LINK_TIMEOUT)
|
||||
return __io_disarm_linked_timeout(req, link);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__cold void io_flush_timeouts(struct io_ring_ctx *ctx);
|
||||
struct io_cancel_data;
|
||||
int io_timeout_cancel(struct io_ring_ctx *ctx, struct io_cancel_data *cd);
|
||||
|
|
Loading…
Add table
Reference in a new issue