diff options
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 85cf0f715eb0..6f28b7e926d1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -3804,9 +3804,17 @@ retry_cpuset: | |||
| 3804 | /* | 3804 | /* |
| 3805 | * Restore the original nodemask if it was potentially replaced with | 3805 | * Restore the original nodemask if it was potentially replaced with |
| 3806 | * &cpuset_current_mems_allowed to optimize the fast-path attempt. | 3806 | * &cpuset_current_mems_allowed to optimize the fast-path attempt. |
| 3807 | * Also recalculate the starting point for the zonelist iterator or | ||
| 3808 | * we could end up iterating over non-eligible zones endlessly. | ||
| 3807 | */ | 3809 | */ |
| 3808 | if (cpusets_enabled()) | 3810 | if (unlikely(ac.nodemask != nodemask)) { |
| 3809 | ac.nodemask = nodemask; | 3811 | ac.nodemask = nodemask; |
| 3812 | ac.preferred_zoneref = first_zones_zonelist(ac.zonelist, | ||
| 3813 | ac.high_zoneidx, ac.nodemask); | ||
| 3814 | if (!ac.preferred_zoneref->zone) | ||
| 3815 | goto no_zone; | ||
| 3816 | } | ||
| 3817 | |||
| 3810 | page = __alloc_pages_slowpath(alloc_mask, order, &ac); | 3818 | page = __alloc_pages_slowpath(alloc_mask, order, &ac); |
| 3811 | 3819 | ||
| 3812 | no_zone: | 3820 | no_zone: |
