aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index b8846cf2358a..1c0a3db78a05 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1239,7 +1239,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct * vma,
1239 } 1239 }
1240 old_page = pfn_to_page(pfn); 1240 old_page = pfn_to_page(pfn);
1241 1241
1242 if (!TestSetPageLocked(old_page)) { 1242 if (PageAnon(old_page) && !TestSetPageLocked(old_page)) {
1243 int reuse = can_share_swap_page(old_page); 1243 int reuse = can_share_swap_page(old_page);
1244 unlock_page(old_page); 1244 unlock_page(old_page);
1245 if (reuse) { 1245 if (reuse) {