X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=mm%2Foom_kill.c;h=ea2147dabba60febfb381b8fb788c9a0cbf9ed30;hb=a4d9d0b8a8d2a81b3189bd99482aab967ce86120;hp=372692294844ea280524f753d7269cfaf8e19f3f;hpb=495789a51a91cb8c015d8d77fecbac1caf20b186;p=safe%2Fjmp%2Flinux-2.6 diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 3726922..ea2147d 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -373,11 +373,6 @@ static void __oom_kill_task(struct task_struct *p, int verbose) static int oom_kill_task(struct task_struct *p) { - struct mm_struct *mm; - struct task_struct *g, *q; - - mm = p->mm; - /* WARNING: mm may not be dereferenced since we did not obtain its * value from get_task_mm(p). This is OK since all we need to do is * compare mm to q->mm below. @@ -386,21 +381,11 @@ static int oom_kill_task(struct task_struct *p) * change to NULL at any time since we do not hold task_lock(p). * However, this is of no concern to us. */ - if (!mm || p->signal->oom_adj == OOM_DISABLE) + if (!p->mm || p->signal->oom_adj == OOM_DISABLE) return 1; __oom_kill_task(p, 1); - /* - * kill all processes that share the ->mm (i.e. all threads), - * but are in a different thread group. Don't let them have access - * to memory reserves though, otherwise we might deplete all memory. - */ - do_each_thread(g, q) { - if (q->mm == mm && !same_thread_group(q, p)) - force_sig(SIGKILL, q); - } while_each_thread(g, q); - return 0; }