diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2010-08-09 17:19:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-09 20:45:02 -0700 |
commit | 9a5b489b870def9a93f5e89dac03ebe136f901db (patch) | |
tree | df7f0acfdb81ce0d77b78ff4d131c40472731994 /mm/memory.c | |
parent | ad8c2ee801ad7a52d919b478d9b2c7b39a72d295 (diff) |
mm: set VM_FAULT_WRITE in do_swap_page()
Set the flag if do_swap_page is decowing the page the same way do_wp_page
would too.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index 6bc039486e9..1ecca56e0a4 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2723,6 +2723,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, if ((flags & FAULT_FLAG_WRITE) && reuse_swap_page(page)) { pte = maybe_mkwrite(pte_mkdirty(pte), vma); flags &= ~FAULT_FLAG_WRITE; + ret |= VM_FAULT_WRITE; exclusive = 1; } flush_icache_page(vma, page); |