diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-07 09:43:38 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-07 09:43:45 +0200 |
commit | 556ef63255f1a6f82910a637c4164dbf7d3d1af2 (patch) | |
tree | ae209fe4959e0837bf4eb72abc6e02c8a82179a1 /mm/ksm.c | |
parent | d4f8f217b8a5d5bd02af979650418dca4caec472 (diff) | |
parent | cb655d0f3d57c23db51b981648e452988c0223f9 (diff) | |
download | linux-556ef63255f1a6f82910a637c4164dbf7d3d1af2.tar.gz linux-556ef63255f1a6f82910a637c4164dbf7d3d1af2.tar.xz |
Merge commit 'v2.6.36-rc7' into core/rcu
Merge reason: Update from -rc3 to -rc7.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -712,7 +712,7 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page, if (!ptep) goto out; - if (pte_write(*ptep)) { + if (pte_write(*ptep) || pte_dirty(*ptep)) { pte_t entry; swapped = PageSwapCache(page); @@ -735,7 +735,9 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page, set_pte_at(mm, addr, ptep, entry); goto out_unlock; } - entry = pte_wrprotect(entry); + if (pte_dirty(entry)) + set_page_dirty(page); + entry = pte_mkclean(pte_wrprotect(entry)); set_pte_at_notify(mm, addr, ptep, entry); } *orig_pte = *ptep; |