diff options
-rw-r--r-- | mm/oom_kill.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 3791edfffeeb..a35e7a8ebd7e 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -147,9 +147,11 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) | |||
147 | * Adjust the score by oomkilladj. | 147 | * Adjust the score by oomkilladj. |
148 | */ | 148 | */ |
149 | if (p->oomkilladj) { | 149 | if (p->oomkilladj) { |
150 | if (p->oomkilladj > 0) | 150 | if (p->oomkilladj > 0) { |
151 | if (!points) | ||
152 | points = 1; | ||
151 | points <<= p->oomkilladj; | 153 | points <<= p->oomkilladj; |
152 | else | 154 | } else |
153 | points >>= -(p->oomkilladj); | 155 | points >>= -(p->oomkilladj); |
154 | } | 156 | } |
155 | 157 | ||