diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index dc785b438d70..d1153e37e9ba 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2138,6 +2138,13 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2138 | page_cache_release(old_page); | 2138 | page_cache_release(old_page); |
2139 | } | 2139 | } |
2140 | reuse = reuse_swap_page(old_page); | 2140 | reuse = reuse_swap_page(old_page); |
2141 | if (reuse) | ||
2142 | /* | ||
2143 | * The page is all ours. Move it to our anon_vma so | ||
2144 | * the rmap code will not search our parent or siblings. | ||
2145 | * Protected against the rmap code by the page lock. | ||
2146 | */ | ||
2147 | page_move_anon_rmap(old_page, vma, address); | ||
2141 | unlock_page(old_page); | 2148 | unlock_page(old_page); |
2142 | } else if (unlikely((vma->vm_flags & (VM_WRITE|VM_SHARED)) == | 2149 | } else if (unlikely((vma->vm_flags & (VM_WRITE|VM_SHARED)) == |
2143 | (VM_WRITE|VM_SHARED))) { | 2150 | (VM_WRITE|VM_SHARED))) { |