aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c5
-rw-r--r--mm/slab.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index e0fda156f021..db861d8b6c28 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -699,6 +699,11 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
699 dst_pte = huge_pte_alloc(dst, addr); 699 dst_pte = huge_pte_alloc(dst, addr);
700 if (!dst_pte) 700 if (!dst_pte)
701 goto nomem; 701 goto nomem;
702
703 /* If the pagetables are shared don't copy or take references */
704 if (dst_pte == src_pte)
705 continue;
706
702 spin_lock(&dst->page_table_lock); 707 spin_lock(&dst->page_table_lock);
703 spin_lock(&src->page_table_lock); 708 spin_lock(&src->page_table_lock);
704 if (!pte_none(*src_pte)) { 709 if (!pte_none(*src_pte)) {
diff --git a/mm/slab.c b/mm/slab.c
index aebb9f68557a..b03b2e46b806 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1590,7 +1590,7 @@ void __init kmem_cache_init(void)
1590 /* Replace the static kmem_list3 structures for the boot cpu */ 1590 /* Replace the static kmem_list3 structures for the boot cpu */
1591 init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], node); 1591 init_list(&cache_cache, &initkmem_list3[CACHE_CACHE], node);
1592 1592
1593 for_each_node_state(nid, N_NORMAL_MEMORY) { 1593 for_each_online_node(nid) {
1594 init_list(malloc_sizes[INDEX_AC].cs_cachep, 1594 init_list(malloc_sizes[INDEX_AC].cs_cachep,
1595 &initkmem_list3[SIZE_AC + nid], nid); 1595 &initkmem_list3[SIZE_AC + nid], nid);
1596 1596
@@ -1968,7 +1968,7 @@ static void __init set_up_list3s(struct kmem_cache *cachep, int index)
1968{ 1968{
1969 int node; 1969 int node;
1970 1970
1971 for_each_node_state(node, N_NORMAL_MEMORY) { 1971 for_each_online_node(node) {
1972 cachep->nodelists[node] = &initkmem_list3[index + node]; 1972 cachep->nodelists[node] = &initkmem_list3[index + node];
1973 cachep->nodelists[node]->next_reap = jiffies + 1973 cachep->nodelists[node]->next_reap = jiffies +
1974 REAPTIMEOUT_LIST3 + 1974 REAPTIMEOUT_LIST3 +
@@ -3815,7 +3815,7 @@ static int alloc_kmemlist(struct kmem_cache *cachep)
3815 struct array_cache *new_shared; 3815 struct array_cache *new_shared;
3816 struct array_cache **new_alien = NULL; 3816 struct array_cache **new_alien = NULL;
3817 3817
3818 for_each_node_state(node, N_NORMAL_MEMORY) { 3818 for_each_online_node(node) {
3819 3819
3820 if (use_alien_caches) { 3820 if (use_alien_caches) {
3821 new_alien = alloc_alien_cache(node, cachep->limit); 3821 new_alien = alloc_alien_cache(node, cachep->limit);