[PATCH] sched/deadline: check start_dl_timer expiry with ktime_before()

Liang Hao <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
Replace ktime_us_delta() < 0 with ktime_before() so the past-expiry
test uses the same resolution as act/now.

Signed-off-by: Liang Hao <[email protected]>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index c3e38d4f3365..e6b69140ae1a 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1097,7 +1097,7 @@ static int start_dl_timer(struct sched_dl_entity *dl_se)
 	 * chosen as the deadline is too small, don't even try to
 	 * start the timer in the past!
 	 */
-	if (ktime_us_delta(act, now) < 0)
+	if (ktime_before(act, now))
 		return 0;
 
 	/*
-- 
2.50.1 (Apple Git-155)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.