diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-03-04 14:00:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-04 14:00:05 -0500 |
commit | 0bbdb4258bd116d8cd5d209e8d5b29bae516e5b3 (patch) | |
tree | c607302701f7a7942f2e76391fdb406ec86628d5 /kernel/fork.c | |
parent | bd624d75db21ea5402f9ecf4450b311794d80352 (diff) | |
parent | 13a7a6ac0a11197edcd0f756a035f472b42cdf8b (diff) |
Merge tag 'v4.0-rc2' into timers/core, to refresh the tree before pulling more changes
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 4dc2ddade9f1..cf65139615a0 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -438,12 +438,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) | |||
438 | atomic_inc(&mapping->i_mmap_writable); | 438 | atomic_inc(&mapping->i_mmap_writable); |
439 | flush_dcache_mmap_lock(mapping); | 439 | flush_dcache_mmap_lock(mapping); |
440 | /* insert tmp into the share list, just after mpnt */ | 440 | /* insert tmp into the share list, just after mpnt */ |
441 | if (unlikely(tmp->vm_flags & VM_NONLINEAR)) | 441 | vma_interval_tree_insert_after(tmp, mpnt, |
442 | vma_nonlinear_insert(tmp, | 442 | &mapping->i_mmap); |
443 | &mapping->i_mmap_nonlinear); | ||
444 | else | ||
445 | vma_interval_tree_insert_after(tmp, mpnt, | ||
446 | &mapping->i_mmap); | ||
447 | flush_dcache_mmap_unlock(mapping); | 443 | flush_dcache_mmap_unlock(mapping); |
448 | i_mmap_unlock_write(mapping); | 444 | i_mmap_unlock_write(mapping); |
449 | } | 445 | } |
@@ -559,6 +555,7 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) | |||
559 | INIT_LIST_HEAD(&mm->mmlist); | 555 | INIT_LIST_HEAD(&mm->mmlist); |
560 | mm->core_state = NULL; | 556 | mm->core_state = NULL; |
561 | atomic_long_set(&mm->nr_ptes, 0); | 557 | atomic_long_set(&mm->nr_ptes, 0); |
558 | mm_nr_pmds_init(mm); | ||
562 | mm->map_count = 0; | 559 | mm->map_count = 0; |
563 | mm->locked_vm = 0; | 560 | mm->locked_vm = 0; |
564 | mm->pinned_vm = 0; | 561 | mm->pinned_vm = 0; |
@@ -607,6 +604,14 @@ static void check_mm(struct mm_struct *mm) | |||
607 | printk(KERN_ALERT "BUG: Bad rss-counter state " | 604 | printk(KERN_ALERT "BUG: Bad rss-counter state " |
608 | "mm:%p idx:%d val:%ld\n", mm, i, x); | 605 | "mm:%p idx:%d val:%ld\n", mm, i, x); |
609 | } | 606 | } |
607 | |||
608 | if (atomic_long_read(&mm->nr_ptes)) | ||
609 | pr_alert("BUG: non-zero nr_ptes on freeing mm: %ld\n", | ||
610 | atomic_long_read(&mm->nr_ptes)); | ||
611 | if (mm_nr_pmds(mm)) | ||
612 | pr_alert("BUG: non-zero nr_pmds on freeing mm: %ld\n", | ||
613 | mm_nr_pmds(mm)); | ||
614 | |||
610 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS | 615 | #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS |
611 | VM_BUG_ON_MM(mm->pmd_huge_pte, mm); | 616 | VM_BUG_ON_MM(mm->pmd_huge_pte, mm); |
612 | #endif | 617 | #endif |