|
@@ -799,14 +799,18 @@ __alloc_pages(unsigned int __nocast gfp_mask, unsigned int order,
|
|
|
}
|
|
|
|
|
|
/* This allocation should allow future memory freeing. */
|
|
|
- if (((p->flags & PF_MEMALLOC) || unlikely(test_thread_flag(TIF_MEMDIE))) && !in_interrupt()) {
|
|
|
- /* go through the zonelist yet again, ignoring mins */
|
|
|
- for (i = 0; (z = zones[i]) != NULL; i++) {
|
|
|
- if (!cpuset_zone_allowed(z))
|
|
|
- continue;
|
|
|
- page = buffered_rmqueue(z, order, gfp_mask);
|
|
|
- if (page)
|
|
|
- goto got_pg;
|
|
|
+
|
|
|
+ if (((p->flags & PF_MEMALLOC) || unlikely(test_thread_flag(TIF_MEMDIE)))
|
|
|
+ && !in_interrupt()) {
|
|
|
+ if (!(gfp_mask & __GFP_NOMEMALLOC)) {
|
|
|
+ /* go through the zonelist yet again, ignoring mins */
|
|
|
+ for (i = 0; (z = zones[i]) != NULL; i++) {
|
|
|
+ if (!cpuset_zone_allowed(z))
|
|
|
+ continue;
|
|
|
+ page = buffered_rmqueue(z, order, gfp_mask);
|
|
|
+ if (page)
|
|
|
+ goto got_pg;
|
|
|
+ }
|
|
|
}
|
|
|
goto nopage;
|
|
|
}
|