Skip to content

Commit c95d365

Browse files
covanamKAGA-KOKO
authored andcommitted
io_uring: Remove redundant hrtimer's callback function setup
The IORING_OP_TIMEOUT command uses hrtimer underneath. The timer's callback function is setup in io_timeout(), and then the callback function is setup again when the timer is rearmed. Since the callback function is the same for both cases, the latter setup is redundant, therefore remove it. Signed-off-by: Nam Cao <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Jens Axboe <[email protected]: Link: https://lore.kernel.org/all/07b28dfd5691478a2d250f379c8b90dd37f9bb9a.1730386209.git.namcao@linutronix.de
1 parent 48baf9f commit c95d365

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

io_uring/timeout.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ static void io_timeout_complete(struct io_kiocb *req, struct io_tw_state *ts)
7676
/* re-arm timer */
7777
spin_lock_irq(&ctx->timeout_lock);
7878
list_add(&timeout->list, ctx->timeout_list.prev);
79-
data->timer.function = io_timeout_fn;
8079
hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), data->mode);
8180
spin_unlock_irq(&ctx->timeout_lock);
8281
return;

0 commit comments

Comments
 (0)