diff options
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |
766 | out: | 770 | out: |
767 | return err; | 771 | return err; |