1773
1778
* mmap_sem in read mode is good idea also to allow greater
1781
new_page = alloc_hugepage_vma(khugepaged_defrag(), vma, address,
1777
1783
if (unlikely(!new_page)) {
1779
1785
*hpage = ERR_PTR(-ENOMEM);
1783
1788
if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) {
1789
1795
/* after allocating the hugepage upgrade to mmap_sem write mode */