mm: rmap: adapt our oppo stuff to v4.14.292 changes

Signed-off-by: Mayur <ultramayur123@gmail.com>
This commit is contained in:
Mayur
2022-09-05 17:43:25 +05:30
committed by theshaenix
parent 561c16a4e2
commit ce88e7a9c8

View File

@@ -354,12 +354,13 @@ int anon_vma_clone_oppo(struct vm_area_struct *dst, struct vm_area_struct *src)
* will always reuse it. Root anon_vma is never reused:
* it has self-parent reference and at least one child.
*/
if (!dst->anon_vma && anon_vma != src->anon_vma &&
anon_vma->degree < 2)
if (!dst->anon_vma &&
anon_vma->num_children < 2 &&
anon_vma->num_active_vmas == 0)
dst->anon_vma = anon_vma;
}
if (dst->anon_vma)
dst->anon_vma->degree++;
dst->anon_vma->num_active_vmas++;
unlock_anon_vma_root(root);
return length;