diff options
Diffstat (limited to 'mm/internal.h')
-rw-r--r-- | mm/internal.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/internal.h b/mm/internal.h index 52d1fa957194..d597f94cc205 100644 --- a/mm/internal.h +++ b/mm/internal.h | |||
@@ -217,15 +217,18 @@ static inline void mlock_migrate_page(struct page *newpage, struct page *page) | |||
217 | { | 217 | { |
218 | if (TestClearPageMlocked(page)) { | 218 | if (TestClearPageMlocked(page)) { |
219 | unsigned long flags; | 219 | unsigned long flags; |
220 | int nr_pages = hpage_nr_pages(page); | ||
220 | 221 | ||
221 | local_irq_save(flags); | 222 | local_irq_save(flags); |
222 | __dec_zone_page_state(page, NR_MLOCK); | 223 | __mod_zone_page_state(page_zone(page), NR_MLOCK, -nr_pages); |
223 | SetPageMlocked(newpage); | 224 | SetPageMlocked(newpage); |
224 | __inc_zone_page_state(newpage, NR_MLOCK); | 225 | __mod_zone_page_state(page_zone(newpage), NR_MLOCK, nr_pages); |
225 | local_irq_restore(flags); | 226 | local_irq_restore(flags); |
226 | } | 227 | } |
227 | } | 228 | } |
228 | 229 | ||
230 | extern pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma); | ||
231 | |||
229 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 232 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
230 | extern unsigned long vma_address(struct page *page, | 233 | extern unsigned long vma_address(struct page *page, |
231 | struct vm_area_struct *vma); | 234 | struct vm_area_struct *vma); |