aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2014-12-17 15:10:27 +0800
committerAlex Shi <alex.shi@linaro.org>2014-12-17 15:10:27 +0800
commitb57438e86302b9a0b175c183827bc4171552d8f9 (patch)
treef089c8bb249d47acdad34a1b7bc87bf26934b2ad /mm
parent3e5fe00cd38e033796a0de2ea9928c0cb460e6b6 (diff)
parenta472efc75989c7092187fe00f0400e02c495c436 (diff)
downloadlinux-linaro-stable-b57438e86302b9a0b175c183827bc4171552d8f9.tar.gz
Merge tag 'v3.10.63' into linux-linaro-lsk
This is the 3.10.63 stable release
Diffstat (limited to 'mm')
-rw-r--r--mm/frontswap.c4
-rw-r--r--mm/memory.c26
2 files changed, 16 insertions, 14 deletions
diff --git a/mm/frontswap.c b/mm/frontswap.c
index 1b24bdcb3197..a55036a68487 100644
--- a/mm/frontswap.c
+++ b/mm/frontswap.c
@@ -244,8 +244,10 @@ int __frontswap_store(struct page *page)
the (older) page from frontswap
*/
inc_frontswap_failed_stores();
- if (dup)
+ if (dup) {
__frontswap_clear(sis, offset);
+ frontswap_ops->invalidate_page(type, offset);
+ }
}
if (frontswap_writethrough_enabled)
/* report failure so swap also writes to swap device */
diff --git a/mm/memory.c b/mm/memory.c
index b5edd6ee71d8..8a305c0c5699 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -836,20 +836,20 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
if (!pte_file(pte)) {
swp_entry_t entry = pte_to_swp_entry(pte);
- if (swap_duplicate(entry) < 0)
- return entry.val;
-
- /* make sure dst_mm is on swapoff's mmlist. */
- if (unlikely(list_empty(&dst_mm->mmlist))) {
- spin_lock(&mmlist_lock);
- if (list_empty(&dst_mm->mmlist))
- list_add(&dst_mm->mmlist,
- &src_mm->mmlist);
- spin_unlock(&mmlist_lock);
- }
- if (likely(!non_swap_entry(entry)))
+ if (likely(!non_swap_entry(entry))) {
+ if (swap_duplicate(entry) < 0)
+ return entry.val;
+
+ /* make sure dst_mm is on swapoff's mmlist. */
+ if (unlikely(list_empty(&dst_mm->mmlist))) {
+ spin_lock(&mmlist_lock);
+ if (list_empty(&dst_mm->mmlist))
+ list_add(&dst_mm->mmlist,
+ &src_mm->mmlist);
+ spin_unlock(&mmlist_lock);
+ }
rss[MM_SWAPENTS]++;
- else if (is_migration_entry(entry)) {
+ } else if (is_migration_entry(entry)) {
page = migration_entry_to_page(entry);
if (PageAnon(page))