提交 97d87c97 编写于 作者: L Li Zefan 提交者: Linus Torvalds

oom_kill: remove unused parameter in badness()

In commit 4c4a2214, we moved the
memcontroller-related code from badness() to select_bad_process(), so the
parameter 'mem' in badness() is unused now.
Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
Acked-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0c0a4a51
...@@ -53,8 +53,7 @@ static DEFINE_SPINLOCK(zone_scan_mutex); ...@@ -53,8 +53,7 @@ static DEFINE_SPINLOCK(zone_scan_mutex);
* of least surprise ... (be careful when you change it) * of least surprise ... (be careful when you change it)
*/ */
unsigned long badness(struct task_struct *p, unsigned long uptime, unsigned long badness(struct task_struct *p, unsigned long uptime)
struct mem_cgroup *mem)
{ {
unsigned long points, cpu_time, run_time, s; unsigned long points, cpu_time, run_time, s;
struct mm_struct *mm; struct mm_struct *mm;
...@@ -256,7 +255,7 @@ static struct task_struct *select_bad_process(unsigned long *ppoints, ...@@ -256,7 +255,7 @@ static struct task_struct *select_bad_process(unsigned long *ppoints,
if (p->oomkilladj == OOM_DISABLE) if (p->oomkilladj == OOM_DISABLE)
continue; continue;
points = badness(p, uptime.tv_sec, mem); points = badness(p, uptime.tv_sec);
if (points > *ppoints || !chosen) { if (points > *ppoints || !chosen) {
chosen = p; chosen = p;
*ppoints = points; *ppoints = points;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册