Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2538d960 authored by Manuel Schölling's avatar Manuel Schölling Committed by Ingo Molnar
Browse files

sched/fair: Use time_after() in record_wakee()



To be future-proof and for better readability the time comparisons are modified
to use time_after() instead of plain, error-prone math.

Signed-off-by: default avatarManuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1400780723-24626-1-git-send-email-manuel.schoelling@gmx.de


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ed61bbc6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4066,7 +4066,7 @@ static void record_wakee(struct task_struct *p)
	 * about the boundary, really active task won't care
	 * about the loss.
	 */
	if (jiffies > current->wakee_flip_decay_ts + HZ) {
	if (time_after(jiffies, current->wakee_flip_decay_ts + HZ)) {
		current->wakee_flips >>= 1;
		current->wakee_flip_decay_ts = jiffies;
	}