summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2024-10-31 16:14:19 +0100
committerThomas Gleixner <tglx@linutronix.de>2024-11-07 02:47:05 +0100
commitc95d36585b9f8c43a4c5d5a9fe22477a138b63f4 (patch)
tree0a7746966221842f346f7e32e09e1c5c9f845834 /io_uring
parent48baf9fa4884e5ccf6ef8fa7099693696ebc6975 (diff)
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 <namcao@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Jens Axboe <axboe@kernel.dk: Link: https://lore.kernel.org/all/07b28dfd5691478a2d250f379c8b90dd37f9bb9a.1730386209.git.namcao@linutronix.de
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/timeout.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/io_uring/timeout.c b/io_uring/timeout.c
index 9973876d91b0..2ffe5e1dc68a 100644
--- a/io_uring/timeout.c
+++ b/io_uring/timeout.c
@@ -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;