aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index e3cd40b2d5d9..f1a0ae6e11b8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6605,10 +6605,10 @@ static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd,
6605 pte_t *pte; 6605 pte_t *pte;
6606 spinlock_t *ptl; 6606 spinlock_t *ptl;
6607 6607
6608 if (pmd_trans_huge_lock(pmd, vma) == 1) { 6608 if (pmd_trans_huge_lock(pmd, vma, &ptl) == 1) {
6609 if (get_mctgt_type_thp(vma, addr, *pmd, NULL) == MC_TARGET_PAGE) 6609 if (get_mctgt_type_thp(vma, addr, *pmd, NULL) == MC_TARGET_PAGE)
6610 mc.precharge += HPAGE_PMD_NR; 6610 mc.precharge += HPAGE_PMD_NR;
6611 spin_unlock(&vma->vm_mm->page_table_lock); 6611 spin_unlock(ptl);
6612 return 0; 6612 return 0;
6613 } 6613 }
6614 6614
@@ -6797,9 +6797,9 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd,
6797 * to be unlocked in __split_huge_page_splitting(), where the main 6797 * to be unlocked in __split_huge_page_splitting(), where the main
6798 * part of thp split is not executed yet. 6798 * part of thp split is not executed yet.
6799 */ 6799 */
6800 if (pmd_trans_huge_lock(pmd, vma) == 1) { 6800 if (pmd_trans_huge_lock(pmd, vma, &ptl) == 1) {
6801 if (mc.precharge < HPAGE_PMD_NR) { 6801 if (mc.precharge < HPAGE_PMD_NR) {
6802 spin_unlock(&vma->vm_mm->page_table_lock); 6802 spin_unlock(ptl);
6803 return 0; 6803 return 0;
6804 } 6804 }
6805 target_type = get_mctgt_type_thp(vma, addr, *pmd, &target); 6805 target_type = get_mctgt_type_thp(vma, addr, *pmd, &target);
@@ -6816,7 +6816,7 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd,
6816 } 6816 }
6817 put_page(page); 6817 put_page(page);
6818 } 6818 }
6819 spin_unlock(&vma->vm_mm->page_table_lock); 6819 spin_unlock(ptl);
6820 return 0; 6820 return 0;
6821 } 6821 }
6822 6822