- /*
- * We use page_add_file_rmap below: if install_page is
- * ever extended to anonymous pages, this will warn us.
- */
- BUG_ON(!page_mapping(page));
-
- pgd = pgd_offset(mm, addr);
- spin_lock(&mm->page_table_lock);
-
- if (!vx_rsspages_avail(mm, 1))
- goto err_unlock;
-
- pmd = pmd_alloc(mm, pgd, addr);
- if (!pmd)
- goto err_unlock;
-
- pte = pte_alloc_map(mm, pmd, addr);