From: Andrew Morton Date: Thu, 26 Jun 2014 00:42:42 +0000 (+1000) Subject: mm-vmallocc-add-a-schedule-point-to-vmalloc-fix X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4a51c3c380e91784ae55583b1a329bc1fbbd541a;p=karo-tx-linux.git mm-vmallocc-add-a-schedule-point-to-vmalloc-fix only do it for __GFP_WAIT, per David Cc: David Rientjes Cc: Eric Dumazet Cc: Hugh Dickins Signed-off-by: Andrew Morton --- diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a7c779d3ffa6..a3cad905f560 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1602,7 +1602,8 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, goto fail; } area->pages[i] = page; - cond_resched(); + if (gfp_mask & __GFP_WAIT) + cond_resched(); } if (map_vm_area(area, prot, &pages))