From 94ef993e40e11de04e47aecd63e27d7c96e68549 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sun, 7 Sep 2008 15:31:39 -0700 Subject: [PATCH] --- yaml --- r: 117613 b: refs/heads/master c: 4ce105d30e08fb8a1783c55a0e48aa3fa200c455 h: refs/heads/master i: 117611: 6945006a70edc6733a8a8ad39913a47ce4a6c5b8 v: v3 --- [refs] | 2 +- trunk/fs/select.c | 5 ++--- trunk/include/linux/hrtimer.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 732d633a1b2e..b061118e97ff 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: da8f2e170ea94cc20f8ebbc8ee8d127edb8f12f1 +refs/heads/master: 4ce105d30e08fb8a1783c55a0e48aa3fa200c455 diff --git a/trunk/fs/select.c b/trunk/fs/select.c index 5e61b43d0766..fdd8584e536d 100644 --- a/trunk/fs/select.c +++ b/trunk/fs/select.c @@ -46,7 +46,7 @@ static unsigned long __estimate_accuracy(struct timespec *tv) unsigned long slack; int divfactor = 1000; - if (task_nice(current)) + if (task_nice(current) > 0) divfactor = divfactor / 5; slack = tv->tv_nsec / divfactor; @@ -66,8 +66,7 @@ static unsigned long estimate_accuracy(struct timespec *tv) * Realtime tasks get a slack of 0 for obvious reasons. */ - if (current->policy == SCHED_FIFO || - current->policy == SCHED_RR) + if (rt_task(current)) return 0; ktime_get_ts(&now); diff --git a/trunk/include/linux/hrtimer.h b/trunk/include/linux/hrtimer.h index 1c0473e8ecb4..95db11f62ff2 100644 --- a/trunk/include/linux/hrtimer.h +++ b/trunk/include/linux/hrtimer.h @@ -363,7 +363,7 @@ static inline int hrtimer_start_expires(struct hrtimer *timer, soft = hrtimer_get_softexpires(timer); hard = hrtimer_get_expires(timer); delta = ktime_to_ns(ktime_sub(hard, soft)); - return hrtimer_start_range_ns(timer, hrtimer_get_expires(timer), delta, mode); + return hrtimer_start_range_ns(timer, soft, delta, mode); } static inline int hrtimer_restart(struct hrtimer *timer)