Merge branch 'master' into export-slabh

This commit is contained in:
Tejun Heo
2010-04-05 11:37:28 +09:00
183 changed files with 4625 additions and 2682 deletions

View File

@@ -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);
}