Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189255
b: refs/heads/master
c: b95c35e
h: refs/heads/master
i:
  189253: 3029c11
  189251: 27ce565
  189247: 7cc78d4
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Apr 1, 2010
1 parent 6f531a9 commit a331673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 30d1872d9eb3663b4cf7bdebcbf5cd465674cced
refs/heads/master: b95c35e76b29ba812e5dabdd91592e25ec640e93
5 changes: 3 additions & 2 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,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);
}
Expand Down

0 comments on commit a331673

Please sign in to comment.