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>
diff --git a/fs/select.c b/fs/select.c
index 5e61b43..fdd8584 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -46,7 +46,7 @@
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 @@
* 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);