Isolate some explicit usage of task->tgid
[linux-2.6-block.git] / mm / oom_kill.c
index a7cb4c43fd11dd33e03cf3c0e9dcf778811d3df9..e3778f1215c085e68d985858701b83acdb725b86 100644 (file)
@@ -326,7 +326,7 @@ static int oom_kill_task(struct task_struct *p)
         * to memory reserves though, otherwise we might deplete all memory.
         */
        do_each_thread(g, q) {
-               if (q->mm == mm && q->tgid != p->tgid)
+               if (q->mm == mm && !same_thread_group(q, p))
                        force_sig(SIGKILL, q);
        } while_each_thread(g, q);