summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/array.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 57746b03e..535c8c527 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -344,9 +344,8 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
/* scale priority and nice values from timeslices to -20..20 */
/* to make it look like a "normal" Unix priority/nice value */
priority = task->counter;
- priority = 20 - (priority * 10 + DEF_PRIORITY / 2) / DEF_PRIORITY;
- nice = task->priority;
- nice = 20 - (nice * 20 + DEF_PRIORITY / 2) / DEF_PRIORITY;
+ priority = 20 - (priority * 10 + DEF_COUNTER / 2) / DEF_COUNTER;
+ nice = task->nice;
read_lock(&tasklist_lock);
ppid = task->p_opptr->pid;