@@ -2820,8 +2826,16 @@ void ksm_add_vma(struct vm_area_struct *vma) { struct mm_struct *mm = vma->vm_mm;
- if (test_bit(MMF_VM_MERGE_ANY, &mm->flags))
- if (test_bit(MMF_VM_MERGE_ANY, &mm->flags)) { __ksm_add_vma(vma);
/** Generally, the flags here always include MMF_VM_MERGEABLE.* However, in rare cases, this flag may be cleared by ksmd who* scans a cycle without finding any mergeable vma.*/if (unlikely(!test_bit(MMF_VM_MERGEABLE, &mm->flags)))__ksm_enter(mm);- }
}
Acked-by: xu xin xu.xin16@zte.com.cn
Thanks!