X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=mm%2Finternal.h;h=d597f94cc2059ade4d9fd808457d240538faac55;hb=dfb2ea45becb198beeb75350d0b7b7ad9076a38f;hp=52d1fa957194f8f8b574a29cef6569b9f8ed0306;hpb=fd62c5450324af7f6cc12897b09b77285cd48a92;p=linux-2.6-block.git 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) { if (TestClearPageMlocked(page)) { unsigned long flags; + int nr_pages = hpage_nr_pages(page); local_irq_save(flags); - __dec_zone_page_state(page, NR_MLOCK); + __mod_zone_page_state(page_zone(page), NR_MLOCK, -nr_pages); SetPageMlocked(newpage); - __inc_zone_page_state(newpage, NR_MLOCK); + __mod_zone_page_state(page_zone(newpage), NR_MLOCK, nr_pages); local_irq_restore(flags); } } +extern pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma); + #ifdef CONFIG_TRANSPARENT_HUGEPAGE extern unsigned long vma_address(struct page *page, struct vm_area_struct *vma);