From: Andrew Morton Date: Tue, 10 Aug 2010 00:19:43 +0000 (-0700) Subject: oom: move badness() declaration into oom.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74bcbf40546bb7500f2a7ba4ff3cc056a6bd004a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git oom: move badness() declaration into oom.h Cc: Minchan Kim Cc: David Rientjes Cc: KAMEZAWA Hiroyuki Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/base.c b/fs/proc/base.c index fc23f62bb0b..5949d0ac30f 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -427,9 +427,6 @@ static const struct file_operations proc_lstats_operations = { #endif -/* The badness from the OOM killer */ -unsigned long badness(struct task_struct *p, struct mem_cgroup *mem, - nodemask_t *nodemask, unsigned long uptime); static int proc_oom_score(struct task_struct *task, char *buffer) { unsigned long points = 0; diff --git a/include/linux/oom.h b/include/linux/oom.h index 9d7c34a741e..40e5e3a6bc2 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h @@ -14,6 +14,8 @@ struct zonelist; struct notifier_block; +struct mem_cgroup; +struct task_struct; /* * Types of limitations to the nodes from which allocations may occur @@ -45,6 +47,10 @@ static inline void oom_killer_enable(void) oom_killer_disabled = false; } +/* The badness from the OOM killer */ +extern unsigned long badness(struct task_struct *p, struct mem_cgroup *mem, + const nodemask_t *nodemask, unsigned long uptime); + /* sysctls */ extern int sysctl_oom_dump_tasks; extern int sysctl_oom_kill_allocating_task;