[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e8fbdf7bd54e2fd7f17c1d5ec75914787df7f96b.1729865740.git.namcao@linutronix.de>
Date: Mon, 28 Oct 2024 08:35:49 +0100
From: Nam Cao <namcao@...utronix.de>
To: Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Miguel Ojeda <ojeda@...nel.org>,
Kees Cook <kees@...nel.org>,
linux-kernel@...r.kernel.org
Cc: Nam Cao <namcao@...utronix.de>,
Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 05/12] io_uring: Use helper function hrtimer_update_function()
There is a new helper function hrtimer_update_function() to change the
hrtimer's callback function, which also performs additional runtime check
that it is safe to change the callback.
Use the helper function instead of accessing 'function' directly.
Signed-off-by: Nam Cao <namcao@...utronix.de>
---
Cc: Jens Axboe <axboe@...nel.dk>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 0842aa3f60e7..5a3c2d647467 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2423,7 +2423,7 @@ static enum hrtimer_restart io_cqring_min_timer_wakeup(struct hrtimer *timer)
goto out_wake;
}
- iowq->t.function = io_cqring_timer_wakeup;
+ hrtimer_update_function(&iowq->t, io_cqring_timer_wakeup);
hrtimer_set_expires(timer, iowq->timeout);
return HRTIMER_RESTART;
out_wake:
--
2.39.5
Powered by blists - more mailing lists