diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-04 17:23:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-04 17:23:30 -0400 |
commit | a9fda02bfc91a281cd812ae15dabe6bfb9574f90 (patch) | |
tree | d7be703f341870f15f87a59a63976f650078b4d6 /mm/memory.c | |
parent | aa3090005d27f3c7fba915ccea36b97b669fa3ab (diff) | |
parent | ec706dab290c486837d4a825870ab052bf200279 (diff) |
Merge branch 'for_rmk' of git://git.linaro.org/kernel/linux-linaro-next into devel-stable
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c index 71b161b73bb5..0e18b4d649ec 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2680,10 +2680,12 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2680 | delayacct_clear_flag(DELAYACCT_PF_SWAPIN); | 2680 | delayacct_clear_flag(DELAYACCT_PF_SWAPIN); |
2681 | 2681 | ||
2682 | /* | 2682 | /* |
2683 | * Make sure try_to_free_swap didn't release the swapcache | 2683 | * Make sure try_to_free_swap or reuse_swap_page or swapoff did not |
2684 | * from under us. The page pin isn't enough to prevent that. | 2684 | * release the swapcache from under us. The page pin, and pte_same |
2685 | * test below, are not enough to exclude that. Even if it is still | ||
2686 | * swapcache, we need to check that the page's swap has not changed. | ||
2685 | */ | 2687 | */ |
2686 | if (unlikely(!PageSwapCache(page))) | 2688 | if (unlikely(!PageSwapCache(page) || page_private(page) != entry.val)) |
2687 | goto out_page; | 2689 | goto out_page; |
2688 | 2690 | ||
2689 | if (ksm_might_need_to_copy(page, vma, address)) { | 2691 | if (ksm_might_need_to_copy(page, vma, address)) { |