diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index 7a61a11f1867..1a435b81876c 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/swap.h> | 45 | #include <linux/swap.h> |
46 | #include <linux/highmem.h> | 46 | #include <linux/highmem.h> |
47 | #include <linux/pagemap.h> | 47 | #include <linux/pagemap.h> |
48 | #include <linux/ksm.h> | ||
48 | #include <linux/rmap.h> | 49 | #include <linux/rmap.h> |
49 | #include <linux/module.h> | 50 | #include <linux/module.h> |
50 | #include <linux/delayacct.h> | 51 | #include <linux/delayacct.h> |
@@ -1974,7 +1975,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1974 | * Take out anonymous pages first, anonymous shared vmas are | 1975 | * Take out anonymous pages first, anonymous shared vmas are |
1975 | * not dirty accountable. | 1976 | * not dirty accountable. |
1976 | */ | 1977 | */ |
1977 | if (PageAnon(old_page)) { | 1978 | if (PageAnon(old_page) && !PageKsm(old_page)) { |
1978 | if (!trylock_page(old_page)) { | 1979 | if (!trylock_page(old_page)) { |
1979 | page_cache_get(old_page); | 1980 | page_cache_get(old_page); |
1980 | pte_unmap_unlock(page_table, ptl); | 1981 | pte_unmap_unlock(page_table, ptl); |