Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Pavel Begunkov and committed by
Jens Axboe
78967aab a5c98e94

+8 -16
+8 -3
io_uring/timeout.c
··· 35 35 bool ltimeout; 36 36 }; 37 37 38 + static struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req, 39 + struct io_kiocb *link); 40 + 38 41 static inline bool io_is_timeout_noseq(struct io_kiocb *req) 39 42 { 40 43 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); ··· 221 218 struct io_ring_ctx *ctx = req->ctx; 222 219 223 220 raw_spin_lock_irq(&ctx->timeout_lock); 224 - link = io_disarm_linked_timeout(req); 221 + if (req->link && req->link->opcode == IORING_OP_LINK_TIMEOUT) 222 + link = __io_disarm_linked_timeout(req, req->link); 223 + 225 224 raw_spin_unlock_irq(&ctx->timeout_lock); 226 225 if (link) 227 226 io_req_queue_tw_complete(link, -ECANCELED); ··· 233 228 io_fail_links(req); 234 229 } 235 230 236 - struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req, 237 - struct io_kiocb *link) 231 + static struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req, 232 + struct io_kiocb *link) 238 233 __must_hold(&req->ctx->completion_lock) 239 234 __must_hold(&req->ctx->timeout_lock) 240 235 {
-13
io_uring/timeout.h
··· 8 8 u32 flags; 9 9 }; 10 10 11 - struct io_kiocb *__io_disarm_linked_timeout(struct io_kiocb *req, 12 - struct io_kiocb *link); 13 - 14 - static inline struct io_kiocb *io_disarm_linked_timeout(struct io_kiocb *req) 15 - { 16 - struct io_kiocb *link = req->link; 17 - 18 - if (link && link->opcode == IORING_OP_LINK_TIMEOUT) 19 - return __io_disarm_linked_timeout(req, link); 20 - 21 - return NULL; 22 - } 23 - 24 11 __cold void io_flush_timeouts(struct io_ring_ctx *ctx); 25 12 struct io_cancel_data; 26 13 int io_timeout_cancel(struct io_ring_ctx *ctx, struct io_cancel_data *cd);