diff options
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index c94e58b192c3..e550bec20582 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1481,7 +1481,7 @@ struct zonelist *huge_zonelist(struct vm_area_struct *vma, unsigned long addr, | |||
1481 | 1481 | ||
1482 | if (unlikely((*mpol)->mode == MPOL_INTERLEAVE)) { | 1482 | if (unlikely((*mpol)->mode == MPOL_INTERLEAVE)) { |
1483 | zl = node_zonelist(interleave_nid(*mpol, vma, addr, | 1483 | zl = node_zonelist(interleave_nid(*mpol, vma, addr, |
1484 | HPAGE_SHIFT), gfp_flags); | 1484 | huge_page_shift(hstate_vma(vma))), gfp_flags); |
1485 | } else { | 1485 | } else { |
1486 | zl = policy_zonelist(gfp_flags, *mpol); | 1486 | zl = policy_zonelist(gfp_flags, *mpol); |
1487 | if ((*mpol)->mode == MPOL_BIND) | 1487 | if ((*mpol)->mode == MPOL_BIND) |
@@ -2220,9 +2220,12 @@ static void check_huge_range(struct vm_area_struct *vma, | |||
2220 | { | 2220 | { |
2221 | unsigned long addr; | 2221 | unsigned long addr; |
2222 | struct page *page; | 2222 | struct page *page; |
2223 | struct hstate *h = hstate_vma(vma); | ||
2224 | unsigned long sz = huge_page_size(h); | ||
2223 | 2225 | ||
2224 | for (addr = start; addr < end; addr += HPAGE_SIZE) { | 2226 | for (addr = start; addr < end; addr += sz) { |
2225 | pte_t *ptep = huge_pte_offset(vma->vm_mm, addr & HPAGE_MASK); | 2227 | pte_t *ptep = huge_pte_offset(vma->vm_mm, |
2228 | addr & huge_page_mask(h)); | ||
2226 | pte_t pte; | 2229 | pte_t pte; |
2227 | 2230 | ||
2228 | if (!ptep) | 2231 | if (!ptep) |