X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=mm%2Foom_kill.c;h=4748b906aff23451c9bbf838ddc1add16bbf1cc9;hb=f4598c8b3678abd65be3be00ed3d046375a4777e;hp=ac3bf33e53701171bcf4b5f6ba8b1817bdac60f5;hpb=32983696a48a6c41d99f3eca82ba7510a552d843;p=linux-2.6-omap-h63xx.git diff --git a/mm/oom_kill.c b/mm/oom_kill.c index ac3bf33e537..4748b906aff 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -263,7 +263,7 @@ static struct mm_struct *oom_kill_process(struct task_struct *p) * OR try to be smart about which process to kill. Note that we * don't have to be perfect here, we just have to be good. */ -void out_of_memory(unsigned int __nocast gfp_mask, int order) +void out_of_memory(gfp_t gfp_mask, int order) { struct mm_struct *mm = NULL; task_t * p; @@ -298,7 +298,8 @@ retry: /* * Give "p" a good chance of killing itself before we - * retry to allocate memory. + * retry to allocate memory unless "p" is current */ - schedule_timeout_interruptible(1); + if (!test_thread_flag(TIF_MEMDIE)) + schedule_timeout_interruptible(1); }