Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211226
b: refs/heads/master
c: 4e31635
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Oct 4, 2010
1 parent a457b84 commit dad61c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4829b906cc063cb7cd1b7f34fa05de6db75ec8bb
refs/heads/master: 4e31635c367a9e21a43cfbfae4c9deda2e19d1f4
6 changes: 4 additions & 2 deletions trunk/mm/ksm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit dad61c1

Please sign in to comment.