aboutsummaryrefslogtreecommitdiffstats
path: root/mm/ksm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/ksm.c')
-rw-r--r--mm/ksm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/ksm.c b/mm/ksm.c
index 748785683399..af5f571185d5 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -34,6 +34,7 @@
34#include <linux/ksm.h> 34#include <linux/ksm.h>
35 35
36#include <asm/tlbflush.h> 36#include <asm/tlbflush.h>
37#include "internal.h"
37 38
38/* 39/*
39 * A few notes about the KSM scanning process, 40 * A few notes about the KSM scanning process,
@@ -762,6 +763,9 @@ static int try_to_merge_one_page(struct vm_area_struct *vma,
762 pages_identical(page, kpage)) 763 pages_identical(page, kpage))
763 err = replace_page(vma, page, kpage, orig_pte); 764 err = replace_page(vma, page, kpage, orig_pte);
764 765
766 if ((vma->vm_flags & VM_LOCKED) && !err)
767 munlock_vma_page(page);
768
765 unlock_page(page); 769 unlock_page(page);
766out: 770out:
767 return err; 771 return err;