]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/ksm.c
mm: introduce arch-specific vma flag VM_ARCH_1
[mirror_ubuntu-bionic-kernel.git] / mm / ksm.c
index 47c885368890741407eb45e8699acb12fc773aca..d1cbe2aa6b3a74dc71980b6b93650d2f75766ccc 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1470,9 +1470,14 @@ int ksm_madvise(struct vm_area_struct *vma, unsigned long start,
                if (*vm_flags & (VM_MERGEABLE | VM_SHARED  | VM_MAYSHARE   |
                                 VM_PFNMAP    | VM_IO      | VM_DONTEXPAND |
                                 VM_RESERVED  | VM_HUGETLB | VM_INSERTPAGE |
-                                VM_NONLINEAR | VM_MIXEDMAP | VM_SAO))
+                                VM_NONLINEAR | VM_MIXEDMAP))
                        return 0;               /* just ignore the advice */
 
+#ifdef VM_SAO
+               if (*vm_flags & VM_SAO)
+                       return 0;
+#endif
+
                if (!test_bit(MMF_VM_MERGEABLE, &mm->flags)) {
                        err = __ksm_enter(mm);
                        if (err)