aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/ksm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/ksm.c b/mm/ksm.c
index 9f8f0523562b..81f692e836db 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1268,6 +1268,14 @@ static void ksm_do_scan(unsigned int scan_npages)
1268 return; 1268 return;
1269 if (!PageKsm(page) || !in_stable_tree(rmap_item)) 1269 if (!PageKsm(page) || !in_stable_tree(rmap_item))
1270 cmp_and_merge_page(page, rmap_item); 1270 cmp_and_merge_page(page, rmap_item);
1271 else if (page_mapcount(page) == 1) {
1272 /*
1273 * Replace now-unshared ksm page by ordinary page.
1274 */
1275 break_cow(rmap_item->mm, rmap_item->address);
1276 remove_rmap_item_from_tree(rmap_item);
1277 rmap_item->oldchecksum = calc_checksum(page);
1278 }
1271 put_page(page); 1279 put_page(page);
1272 } 1280 }
1273} 1281}