diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-11-29 11:54:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-29 17:09:16 -0500 |
commit | e5bbe4dfc8dbfc50ef89f8641e020616d4d1e69e (patch) | |
tree | 8bf22ece18b6f7e20024bef19d8afd2a0b07556a /mm | |
parent | 5d2a2dbbc1025dbf7998b9289574d9592b8f21cc (diff) |
[PATCH] pfnmap: remove src_page from do_wp_page
Clean away do_wp_page's "src_page": cow_user_page makes it unnecessary.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c index 745b3482e6c2..ae259b6e5a21 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1433,12 +1433,11 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1433 | unsigned long address, pte_t *page_table, pmd_t *pmd, | 1433 | unsigned long address, pte_t *page_table, pmd_t *pmd, |
1434 | spinlock_t *ptl, pte_t orig_pte) | 1434 | spinlock_t *ptl, pte_t orig_pte) |
1435 | { | 1435 | { |
1436 | struct page *old_page, *src_page, *new_page; | 1436 | struct page *old_page, *new_page; |
1437 | pte_t entry; | 1437 | pte_t entry; |
1438 | int ret = VM_FAULT_MINOR; | 1438 | int ret = VM_FAULT_MINOR; |
1439 | 1439 | ||
1440 | old_page = vm_normal_page(vma, address, orig_pte); | 1440 | old_page = vm_normal_page(vma, address, orig_pte); |
1441 | src_page = old_page; | ||
1442 | if (!old_page) | 1441 | if (!old_page) |
1443 | goto gotten; | 1442 | goto gotten; |
1444 | 1443 | ||
@@ -1466,7 +1465,7 @@ gotten: | |||
1466 | 1465 | ||
1467 | if (unlikely(anon_vma_prepare(vma))) | 1466 | if (unlikely(anon_vma_prepare(vma))) |
1468 | goto oom; | 1467 | goto oom; |
1469 | if (src_page == ZERO_PAGE(address)) { | 1468 | if (old_page == ZERO_PAGE(address)) { |
1470 | new_page = alloc_zeroed_user_highpage(vma, address); | 1469 | new_page = alloc_zeroed_user_highpage(vma, address); |
1471 | if (!new_page) | 1470 | if (!new_page) |
1472 | goto oom; | 1471 | goto oom; |
@@ -1474,7 +1473,7 @@ gotten: | |||
1474 | new_page = alloc_page_vma(GFP_HIGHUSER, vma, address); | 1473 | new_page = alloc_page_vma(GFP_HIGHUSER, vma, address); |
1475 | if (!new_page) | 1474 | if (!new_page) |
1476 | goto oom; | 1475 | goto oom; |
1477 | cow_user_page(new_page, src_page, address); | 1476 | cow_user_page(new_page, old_page, address); |
1478 | } | 1477 | } |
1479 | 1478 | ||
1480 | /* | 1479 | /* |