From c85a6c6637128d1d92f82f0bac8a8d1c63a42ca0 Mon Sep 17 00:00:00 2001 From: Hillf Danton Date: Tue, 25 Oct 2011 01:58:30 +1100 Subject: [PATCH] mm/huge_memory: fix typo when updating mmu cache There are three cases of update_mmu_cache() in the file, and the case in function collapse_huge_page() has a typo, namely the last parameter used, which is corrected based on the other two cases. Due to the define of update_mmu_cache by X86, the only arch that implements THP currently, the change here has no really crystal point, but one or two minutes of efforts could be saved for those archs that are likely to support THP in future. Signed-off-by: Hillf Danton Cc: Johannes Weiner Reviewed-by: Andrea Arcangeli Signed-off-by: Andrew Morton --- mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 7aa9a7fbd997..4298abaae153 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1967,7 +1967,7 @@ static void collapse_huge_page(struct mm_struct *mm, BUG_ON(!pmd_none(*pmd)); page_add_new_anon_rmap(new_page, vma, address); set_pmd_at(mm, address, pmd, _pmd); - update_mmu_cache(vma, address, entry); + update_mmu_cache(vma, address, _pmd); prepare_pmd_huge_pte(pgtable, mm); mm->nr_ptes--; spin_unlock(&mm->page_table_lock); -- 2.39.5