oom: kill duplicate OOM_DISABLE check
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tue, 10 Aug 2010 00:19:37 +0000 (17:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Aug 2010 03:45:01 +0000 (20:45 -0700)
select_bad_process() and badness() have the same OOM_DISABLE check.  This
patch kills one.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/oom_kill.c

index 867bd26274b4a16ea4d66638a962e9664250405c..011181ed41e3b44fa5f59e9a736b3ce43f53c9ee 100644 (file)
@@ -350,9 +350,6 @@ static struct task_struct *select_bad_process(unsigned long *ppoints,
                        *ppoints = ULONG_MAX;
                }
 
                        *ppoints = ULONG_MAX;
                }
 
-               if (p->signal->oom_adj == OOM_DISABLE)
-                       continue;
-
                points = badness(p, mem, nodemask, uptime.tv_sec);
                if (points > *ppoints || !chosen) {
                        chosen = p;
                points = badness(p, mem, nodemask, uptime.tv_sec);
                if (points > *ppoints || !chosen) {
                        chosen = p;