Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14777
b: refs/heads/master
c: e5bbe4d
h: refs/heads/master
i:
  14775: 43b68ca
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Nov 29, 2005
1 parent 52062fb commit 20008f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d2a2dbbc1025dbf7998b9289574d9592b8f21cc
refs/heads/master: e5bbe4dfc8dbfc50ef89f8641e020616d4d1e69e
7 changes: 3 additions & 4 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,12 +1433,11 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *page_table, pmd_t *pmd,
spinlock_t *ptl, pte_t orig_pte)
{
struct page *old_page, *src_page, *new_page;
struct page *old_page, *new_page;
pte_t entry;
int ret = VM_FAULT_MINOR;

old_page = vm_normal_page(vma, address, orig_pte);
src_page = old_page;
if (!old_page)
goto gotten;

Expand Down Expand Up @@ -1466,15 +1465,15 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,

if (unlikely(anon_vma_prepare(vma)))
goto oom;
if (src_page == ZERO_PAGE(address)) {
if (old_page == ZERO_PAGE(address)) {
new_page = alloc_zeroed_user_highpage(vma, address);
if (!new_page)
goto oom;
} else {
new_page = alloc_page_vma(GFP_HIGHUSER, vma, address);
if (!new_page)
goto oom;
cow_user_page(new_page, src_page, address);
cow_user_page(new_page, old_page, address);
}

/*
Expand Down

0 comments on commit 20008f4

Please sign in to comment.