@@ -269,10 +269,10 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
{
struct anon_vma_chain *avc, *pavc;
struct anon_vma *root = NULL;
- struct vm_area_struct *prev = dst->vm_prev, *pprev = src->vm_prev;
+ struct vm_area_struct *pprev = src->vm_prev;
/*
- * If parent share anon_vma with its vm_prev, keep this sharing in in
+ * If parent share anon_vma with its vm_prev, keep this sharing in
* child.
*
* 1. Parent has vm_prev, which implies we have vm_prev.
@@ -280,8 +280,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
*/
if (!dst->anon_vma && src->anon_vma &&
pprev && pprev->anon_vma == src->anon_vma)
- dst->anon_vma = prev->anon_vma;
-
+ dst->anon_vma = pprev->anon_vma;
list_for_each_entry_reverse(pavc, &src->anon_vma_chain, same_vma) {
struct anon_vma *anon_vma;
Signed-off-by: Li Xinhai <lixinhai.lxh@gmail.com> Cc: Wei Yang <richardw.yang@linux.intel.com> Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> --- mm/rmap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)