summaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-09-07 15:31:39 -0700
committerArjan van de Ven <arjan@linux.intel.com>2008-09-07 15:31:39 -0700
commit4ce105d30e08fb8a1783c55a0e48aa3fa200c455 (patch)
tree1bfc0b3d4f987e69b16cb35dfc3dedf9ab288b1b /fs/select.c
parentda8f2e170ea94cc20f8ebbc8ee8d127edb8f12f1 (diff)
downloadlinux-4ce105d30e08fb8a1783c55a0e48aa3fa200c455.tar.gz
linux-4ce105d30e08fb8a1783c55a0e48aa3fa200c455.tar.bz2
linux-4ce105d30e08fb8a1783c55a0e48aa3fa200c455.zip
hrtimer: incorporate feedback from Peter Zijlstra
(based on lkml review) * use rt_task() * task_nice() has a sign Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'fs/select.c')
-rw-r--r--fs/select.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/select.c b/fs/select.c
index 5e61b43d0766..fdd8584e536d 100644
--- a/fs/select.c
+++ b/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);