Commit c95d3658 authored by Nam Cao's avatar Nam Cao Committed by Thomas Gleixner
Browse files

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: default avatarNam Cao <namcao@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarJens Axboe <axboe@kernel.dk:>
Link: https://lore.kernel.org/all/07b28dfd5691478a2d250f379c8b90dd37f9bb9a.1730386209.git.namcao@linutronix.de
parent 48baf9fa
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ static void io_timeout_complete(struct io_kiocb *req, struct io_tw_state *ts)
			/* re-arm timer */
			spin_lock_irq(&ctx->timeout_lock);
			list_add(&timeout->list, ctx->timeout_list.prev);
			data->timer.function = io_timeout_fn;
			hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), data->mode);
			spin_unlock_irq(&ctx->timeout_lock);
			return;