aboutsummaryrefslogtreecommitdiffstats
path: root/mm/khugepaged.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/khugepaged.c')
-rw-r--r--mm/khugepaged.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 0f7419938008..eaaa21b23215 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1378,7 +1378,7 @@ static void collapse_shmem(struct mm_struct *mm,
1378 result = SCAN_FAIL; 1378 result = SCAN_FAIL;
1379 goto xa_locked; 1379 goto xa_locked;
1380 } 1380 }
1381 xas_store(&xas, new_page); 1381 xas_store(&xas, new_page + (index % HPAGE_PMD_NR));
1382 nr_none++; 1382 nr_none++;
1383 continue; 1383 continue;
1384 } 1384 }
@@ -1454,7 +1454,7 @@ static void collapse_shmem(struct mm_struct *mm,
1454 list_add_tail(&page->lru, &pagelist); 1454 list_add_tail(&page->lru, &pagelist);
1455 1455
1456 /* Finally, replace with the new page. */ 1456 /* Finally, replace with the new page. */
1457 xas_store(&xas, new_page); 1457 xas_store(&xas, new_page + (index % HPAGE_PMD_NR));
1458 continue; 1458 continue;
1459out_unlock: 1459out_unlock:
1460 unlock_page(page); 1460 unlock_page(page);