diff options
| -rw-r--r-- | include/linux/mm_types.h | 3 | ||||
| -rw-r--r-- | kernel/fork.c | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index bb7288a782fd..26bc4e2cd275 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -310,6 +310,9 @@ struct mm_struct { | |||
| 310 | #ifdef CONFIG_MMU_NOTIFIER | 310 | #ifdef CONFIG_MMU_NOTIFIER |
| 311 | struct mmu_notifier_mm *mmu_notifier_mm; | 311 | struct mmu_notifier_mm *mmu_notifier_mm; |
| 312 | #endif | 312 | #endif |
| 313 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 314 | pgtable_t pmd_huge_pte; /* protected by page_table_lock */ | ||
| 315 | #endif | ||
| 313 | /* How many tasks sharing this mm are OOM_DISABLE */ | 316 | /* How many tasks sharing this mm are OOM_DISABLE */ |
| 314 | atomic_t oom_disable_count; | 317 | atomic_t oom_disable_count; |
| 315 | }; | 318 | }; |
diff --git a/kernel/fork.c b/kernel/fork.c index 1499607e4da2..f78f50ba6cb2 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -529,6 +529,9 @@ void __mmdrop(struct mm_struct *mm) | |||
| 529 | mm_free_pgd(mm); | 529 | mm_free_pgd(mm); |
| 530 | destroy_context(mm); | 530 | destroy_context(mm); |
| 531 | mmu_notifier_mm_destroy(mm); | 531 | mmu_notifier_mm_destroy(mm); |
| 532 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 533 | VM_BUG_ON(mm->pmd_huge_pte); | ||
| 534 | #endif | ||
| 532 | free_mm(mm); | 535 | free_mm(mm); |
| 533 | } | 536 | } |
| 534 | EXPORT_SYMBOL_GPL(__mmdrop); | 537 | EXPORT_SYMBOL_GPL(__mmdrop); |
| @@ -669,6 +672,10 @@ struct mm_struct *dup_mm(struct task_struct *tsk) | |||
| 669 | mm->token_priority = 0; | 672 | mm->token_priority = 0; |
| 670 | mm->last_interval = 0; | 673 | mm->last_interval = 0; |
| 671 | 674 | ||
| 675 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
| 676 | mm->pmd_huge_pte = NULL; | ||
| 677 | #endif | ||
| 678 | |||
| 672 | if (!mm_init(mm, tsk)) | 679 | if (!mm_init(mm, tsk)) |
| 673 | goto fail_nomem; | 680 | goto fail_nomem; |
| 674 | 681 | ||
