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: 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

authored by

Nam Cao and committed by
Thomas Gleixner
c95d3658 48baf9fa

-1
-1
io_uring/timeout.c
··· 76 76 /* re-arm timer */ 77 77 spin_lock_irq(&ctx->timeout_lock); 78 78 list_add(&timeout->list, ctx->timeout_list.prev); 79 - data->timer.function = io_timeout_fn; 80 79 hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), data->mode); 81 80 spin_unlock_irq(&ctx->timeout_lock); 82 81 return;