lightnvm: missing free on init error
[linux-2.6-block.git] / mm / vmalloc.c
index 9db9ef5e8481a15e3bf99bf34276a0588fb2e674..d04563480c94f4137efb6102e8d8beaef3a9dda7 100644 (file)
@@ -35,6 +35,8 @@
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
 
+#include "internal.h"
+
 struct vfree_deferred {
        struct llist_head list;
        struct work_struct wq;
@@ -1617,7 +1619,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
                        goto fail;
                }
                area->pages[i] = page;
-               if (gfp_mask & __GFP_WAIT)
+               if (gfpflags_allow_blocking(gfp_mask))
                        cond_resched();
        }