Subject: set VM_FAULT_WRITE in do_swap_page From: Andrea Arcangeli Set the flag if do_swap_page is decowing the page the same way do_wp_page would too. Signed-off-by: Andrea Arcangeli --- diff --git a/mm/memory.c b/mm/memory.c --- a/mm/memory.c +++ b/mm/memory.c @@ -2730,6 +2730,7 @@ static int do_swap_page(struct mm_struct flags &= ~FAULT_FLAG_WRITE; /* = 2 because the swapcache may be PageAnon already */ exclusive = 2; + ret |= VM_FAULT_WRITE; } flush_icache_page(vma, page); set_pte_at(mm, address, page_table, pte);