diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-02-14 05:55:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-02-14 05:55:18 -0500 |
commit | d2137d5af4259f50c19addb8246a186c9ffac325 (patch) | |
tree | 2f7e309f9cf8ef2f2698532c226edda38021fe69 /mm/mremap.c | |
parent | f005fe12b90c5b9fe180a09209a893e09affa8aa (diff) | |
parent | 795abaf1e4e188c4171e3cd3dbb11a9fcacaf505 (diff) |
Merge branch 'linus' into x86/bootmem
Conflicts:
arch/x86/mm/numa_64.c
Merge reason: fix the conflict, update to latest -rc and pick up this
dependent fix from Yinghai:
e6d2e2b2b1e1: memblock: don't adjust size in memblock_find_base()
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/mremap.c')
-rw-r--r-- | mm/mremap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/mremap.c b/mm/mremap.c index 563fbdd6293a..9925b6391b80 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -41,13 +41,15 @@ static pmd_t *get_old_pmd(struct mm_struct *mm, unsigned long addr) | |||
41 | return NULL; | 41 | return NULL; |
42 | 42 | ||
43 | pmd = pmd_offset(pud, addr); | 43 | pmd = pmd_offset(pud, addr); |
44 | split_huge_page_pmd(mm, pmd); | ||
44 | if (pmd_none_or_clear_bad(pmd)) | 45 | if (pmd_none_or_clear_bad(pmd)) |
45 | return NULL; | 46 | return NULL; |
46 | 47 | ||
47 | return pmd; | 48 | return pmd; |
48 | } | 49 | } |
49 | 50 | ||
50 | static pmd_t *alloc_new_pmd(struct mm_struct *mm, unsigned long addr) | 51 | static pmd_t *alloc_new_pmd(struct mm_struct *mm, struct vm_area_struct *vma, |
52 | unsigned long addr) | ||
51 | { | 53 | { |
52 | pgd_t *pgd; | 54 | pgd_t *pgd; |
53 | pud_t *pud; | 55 | pud_t *pud; |
@@ -62,7 +64,8 @@ static pmd_t *alloc_new_pmd(struct mm_struct *mm, unsigned long addr) | |||
62 | if (!pmd) | 64 | if (!pmd) |
63 | return NULL; | 65 | return NULL; |
64 | 66 | ||
65 | if (!pmd_present(*pmd) && __pte_alloc(mm, pmd, addr)) | 67 | VM_BUG_ON(pmd_trans_huge(*pmd)); |
68 | if (pmd_none(*pmd) && __pte_alloc(mm, vma, pmd, addr)) | ||
66 | return NULL; | 69 | return NULL; |
67 | 70 | ||
68 | return pmd; | 71 | return pmd; |
@@ -147,7 +150,7 @@ unsigned long move_page_tables(struct vm_area_struct *vma, | |||
147 | old_pmd = get_old_pmd(vma->vm_mm, old_addr); | 150 | old_pmd = get_old_pmd(vma->vm_mm, old_addr); |
148 | if (!old_pmd) | 151 | if (!old_pmd) |
149 | continue; | 152 | continue; |
150 | new_pmd = alloc_new_pmd(vma->vm_mm, new_addr); | 153 | new_pmd = alloc_new_pmd(vma->vm_mm, vma, new_addr); |
151 | if (!new_pmd) | 154 | if (!new_pmd) |
152 | break; | 155 | break; |
153 | next = (new_addr + PMD_SIZE) & PMD_MASK; | 156 | next = (new_addr + PMD_SIZE) & PMD_MASK; |