]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-vmallocc-add-a-schedule-point-to-vmalloc-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 26 Jun 2014 00:42:42 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 26 Jun 2014 00:42:42 +0000 (10:42 +1000)
only do it for __GFP_WAIT, per David

Cc: David Rientjes <rientjes@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmalloc.c

index a7c779d3ffa6daa8d43a7eef197800dd821695c8..a3cad905f56050942545254b1ba464ac577e0f50 100644 (file)
@@ -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))