diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c index 6a9c048f6012..7bb70728bb52 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1518,10 +1518,8 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo | |||
1518 | memset(kaddr, 0, PAGE_SIZE); | 1518 | memset(kaddr, 0, PAGE_SIZE); |
1519 | kunmap_atomic(kaddr, KM_USER0); | 1519 | kunmap_atomic(kaddr, KM_USER0); |
1520 | flush_dcache_page(dst); | 1520 | flush_dcache_page(dst); |
1521 | return; | 1521 | } else |
1522 | 1522 | copy_user_highpage(dst, src, va, vma); | |
1523 | } | ||
1524 | copy_user_highpage(dst, src, va, vma); | ||
1525 | } | 1523 | } |
1526 | 1524 | ||
1527 | /* | 1525 | /* |
@@ -1630,6 +1628,7 @@ gotten: | |||
1630 | if (!new_page) | 1628 | if (!new_page) |
1631 | goto oom; | 1629 | goto oom; |
1632 | cow_user_page(new_page, old_page, address, vma); | 1630 | cow_user_page(new_page, old_page, address, vma); |
1631 | __SetPageUptodate(new_page); | ||
1633 | 1632 | ||
1634 | /* | 1633 | /* |
1635 | * Re-check the pte - we dropped the lock | 1634 | * Re-check the pte - we dropped the lock |
@@ -2102,6 +2101,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2102 | page = alloc_zeroed_user_highpage_movable(vma, address); | 2101 | page = alloc_zeroed_user_highpage_movable(vma, address); |
2103 | if (!page) | 2102 | if (!page) |
2104 | goto oom; | 2103 | goto oom; |
2104 | __SetPageUptodate(page); | ||
2105 | 2105 | ||
2106 | entry = mk_pte(page, vma->vm_page_prot); | 2106 | entry = mk_pte(page, vma->vm_page_prot); |
2107 | entry = maybe_mkwrite(pte_mkdirty(entry), vma); | 2107 | entry = maybe_mkwrite(pte_mkdirty(entry), vma); |
@@ -2202,6 +2202,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2202 | goto out; | 2202 | goto out; |
2203 | } | 2203 | } |
2204 | copy_user_highpage(page, vmf.page, address, vma); | 2204 | copy_user_highpage(page, vmf.page, address, vma); |
2205 | __SetPageUptodate(page); | ||
2205 | } else { | 2206 | } else { |
2206 | /* | 2207 | /* |
2207 | * If the page will be shareable, see if the backing | 2208 | * If the page will be shareable, see if the backing |