Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210836
b: refs/heads/master
c: 31c4a3d
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Sep 20, 2010
1 parent 1bfb4ed commit 70c1592
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 2422084a94fcd5038406261b331672a13c92c050
refs/heads/master: 31c4a3d3a0f84a5847665f8aa0552d188389f791
8 changes: 5 additions & 3 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2680,10 +2680,12 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
delayacct_clear_flag(DELAYACCT_PF_SWAPIN);

/*
* Make sure try_to_free_swap didn't release the swapcache
* from under us. The page pin isn't enough to prevent that.
* Make sure try_to_free_swap or reuse_swap_page or swapoff did not
* release the swapcache from under us. The page pin, and pte_same
* test below, are not enough to exclude that. Even if it is still
* swapcache, we need to check that the page's swap has not changed.
*/
if (unlikely(!PageSwapCache(page)))
if (unlikely(!PageSwapCache(page) || page_private(page) != entry.val))
goto out_page;

if (ksm_might_need_to_copy(page, vma, address)) {
Expand Down

0 comments on commit 70c1592

Please sign in to comment.