Merge branch 'master' into export-slabh
This commit is contained in:
@@ -443,12 +443,13 @@ static const struct file_operations proc_lstats_operations = {
|
||||
unsigned long badness(struct task_struct *p, unsigned long uptime);
|
||||
static int proc_oom_score(struct task_struct *task, char *buffer)
|
||||
{
|
||||
unsigned long points;
|
||||
unsigned long points = 0;
|
||||
struct timespec uptime;
|
||||
|
||||
do_posix_clock_monotonic_gettime(&uptime);
|
||||
read_lock(&tasklist_lock);
|
||||
points = badness(task->group_leader, uptime.tv_sec);
|
||||
if (pid_alive(task))
|
||||
points = badness(task, uptime.tv_sec);
|
||||
read_unlock(&tasklist_lock);
|
||||
return sprintf(buffer, "%lu\n", points);
|
||||
}
|
||||
|
Reference in New Issue
Block a user