aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index deb422c39e21..81248992120d 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2419,16 +2419,16 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
2419 new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 2419 new_vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
2420 if (new_vma) { 2420 if (new_vma) {
2421 *new_vma = *vma; 2421 *new_vma = *vma;
2422 new_vma->vm_start = addr;
2423 new_vma->vm_end = addr + len;
2424 new_vma->vm_pgoff = pgoff;
2422 pol = mpol_dup(vma_policy(vma)); 2425 pol = mpol_dup(vma_policy(vma));
2423 if (IS_ERR(pol)) 2426 if (IS_ERR(pol))
2424 goto out_free_vma; 2427 goto out_free_vma;
2428 vma_set_policy(new_vma, pol);
2425 INIT_LIST_HEAD(&new_vma->anon_vma_chain); 2429 INIT_LIST_HEAD(&new_vma->anon_vma_chain);
2426 if (anon_vma_clone(new_vma, vma)) 2430 if (anon_vma_clone(new_vma, vma))
2427 goto out_free_mempol; 2431 goto out_free_mempol;
2428 vma_set_policy(new_vma, pol);
2429 new_vma->vm_start = addr;
2430 new_vma->vm_end = addr + len;
2431 new_vma->vm_pgoff = pgoff;
2432 if (new_vma->vm_file) 2432 if (new_vma->vm_file)
2433 get_file(new_vma->vm_file); 2433 get_file(new_vma->vm_file);
2434 if (new_vma->vm_ops && new_vma->vm_ops->open) 2434 if (new_vma->vm_ops && new_vma->vm_ops->open)