mm: rmap: adapt our oppo stuff to v4.14.292 changes
Signed-off-by: Mayur <ultramayur123@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user