diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-29 14:03:14 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-29 14:03:14 -0800 |
commit | c9cfcddfd65735437a4cb8563d6b66a6da8a5ed6 (patch) | |
tree | 618cdf37baafe8b283bcc9923d9dde89d6428fb5 /fs/exec.c | |
parent | 4168f7a31801bba6acc18662978d24ec850bbbd0 (diff) | |
download | kernel_samsung_smdk4412-c9cfcddfd65735437a4cb8563d6b66a6da8a5ed6.zip kernel_samsung_smdk4412-c9cfcddfd65735437a4cb8563d6b66a6da8a5ed6.tar.gz kernel_samsung_smdk4412-c9cfcddfd65735437a4cb8563d6b66a6da8a5ed6.tar.bz2 |
VM: add common helper function to create the page tables
This logic was duplicated four times, for no good reason.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -306,9 +306,6 @@ void install_arg_page(struct vm_area_struct *vma, struct page *page, unsigned long address) { struct mm_struct *mm = vma->vm_mm; - pgd_t * pgd; - pud_t * pud; - pmd_t * pmd; pte_t * pte; spinlock_t *ptl; @@ -316,14 +313,7 @@ void install_arg_page(struct vm_area_struct *vma, goto out; flush_dcache_page(page); - pgd = pgd_offset(mm, address); - pud = pud_alloc(mm, pgd, address); - if (!pud) - goto out; - pmd = pmd_alloc(mm, pud, address); - if (!pmd) - goto out; - pte = pte_alloc_map_lock(mm, pmd, address, &ptl); + pte = get_locked_pte(mm, address, &ptl); if (!pte) goto out; if (!pte_none(*pte)) { |