> @@ -1655,7 +1672,11 @@ static void collapse_huge_page(struct mm > unsigned long hstart, hend; > > VM_BUG_ON(address & ~HPAGE_PMD_MASK); > +#ifndef CONFIG_NUMA > VM_BUG_ON(!*hpage); > +#else > + VM_BUG_ON(*hpage); > +#endif > > /* > * Prevent all access to pagetables with the exception of > @@ -1693,7 +1714,15 @@ static void collapse_huge_page(struct mm > if (!pmd_present(*pmd) || pmd_trans_huge(*pmd)) > goto out; > > +#ifndef CONFIG_NUMA > new_page = *hpage; > +#else > + new_page = alloc_hugepage_vma(khugepaged_defrag(), vma, address); > + if (unlikely(!new_page)) { > + *hpage = ERR_PTR(-ENOMEM); > + goto out; > + } > +#endif > if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) > goto out; > I think this should be: if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) { #ifdef CONFIG_NUMA put_page(new_page); #endif goto out; } Thanks, Daisuke Nishimura. > @@ -1724,6 +1753,9 @@ static void collapse_huge_page(struct mm > spin_unlock(&mm->page_table_lock); > anon_vma_unlock(vma->anon_vma); > mem_cgroup_uncharge_page(new_page); > +#ifdef CONFIG_NUMA > + put_page(new_page); > +#endif > goto out; > } > > @@ -1759,7 +1791,9 @@ static void collapse_huge_page(struct mm > mm->nr_ptes--; > spin_unlock(&mm->page_table_lock); > > +#ifndef CONFIG_NUMA > *hpage = NULL; > +#endif > khugepaged_pages_collapsed++; > out: > up_write(&mm->mmap_sem); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>