]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kernel/fork: Use mas_dup_store for quicker forking
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 11 Sep 2020 01:36:17 +0000 (21:36 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:11:39 +0000 (15:11 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
kernel/fork.c

index 72fdd9f792152a7dda2330edd6c1e951a72cd075..5ac38d69d178cb7f4476ed4729661fea1824c0bb 100644 (file)
@@ -509,6 +509,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
        rcu_read_lock();
        mas_dup_tree(&old_mas, &mas);
        mas_reset(&old_mas);
+       mas_reset(&mas);
 
        mas_for_each(&old_mas, mpnt, ULONG_MAX) {
                struct file *file;
@@ -592,7 +593,8 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
                prev = tmp;
 
                /* Link the vma into the MT */
-               vma_store(mm, tmp);
+               //vma_store(mm, tmp);
+               mas_dup_store(&mas, tmp);
 
                mm->map_count++;
                if (!(tmp->vm_flags & VM_WIPEONFORK))