aboutsummaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 010d32944d14..ce59ada09462 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1375,13 +1375,14 @@ static void __split_huge_page(struct page *page,
1375 struct anon_vma *anon_vma) 1375 struct anon_vma *anon_vma)
1376{ 1376{
1377 int mapcount, mapcount2; 1377 int mapcount, mapcount2;
1378 pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
1378 struct anon_vma_chain *avc; 1379 struct anon_vma_chain *avc;
1379 1380
1380 BUG_ON(!PageHead(page)); 1381 BUG_ON(!PageHead(page));
1381 BUG_ON(PageTail(page)); 1382 BUG_ON(PageTail(page));
1382 1383
1383 mapcount = 0; 1384 mapcount = 0;
1384 list_for_each_entry(avc, &anon_vma->head, same_anon_vma) { 1385 anon_vma_interval_tree_foreach(avc, &anon_vma->rb_root, pgoff, pgoff) {
1385 struct vm_area_struct *vma = avc->vma; 1386 struct vm_area_struct *vma = avc->vma;
1386 unsigned long addr = vma_address(page, vma); 1387 unsigned long addr = vma_address(page, vma);
1387 BUG_ON(is_vma_temporary_stack(vma)); 1388 BUG_ON(is_vma_temporary_stack(vma));
@@ -1407,7 +1408,7 @@ static void __split_huge_page(struct page *page,
1407 __split_huge_page_refcount(page); 1408 __split_huge_page_refcount(page);
1408 1409
1409 mapcount2 = 0; 1410 mapcount2 = 0;
1410 list_for_each_entry(avc, &anon_vma->head, same_anon_vma) { 1411 anon_vma_interval_tree_foreach(avc, &anon_vma->rb_root, pgoff, pgoff) {
1411 struct vm_area_struct *vma = avc->vma; 1412 struct vm_area_struct *vma = avc->vma;
1412 unsigned long addr = vma_address(page, vma); 1413 unsigned long addr = vma_address(page, vma);
1413 BUG_ON(is_vma_temporary_stack(vma)); 1414 BUG_ON(is_vma_temporary_stack(vma));