From: Liam R. Howlett Date: Tue, 27 Oct 2020 16:54:10 +0000 (-0400) Subject: kernel/fork: Update maple tree interface. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4010be8444de250ed6cd97f4d62a416407517de9;p=users%2Fjedix%2Flinux-maple.git kernel/fork: Update maple tree interface. Start using the number of entries directly, and mas_destroy(). Signed-off-by: Liam R. Howlett --- diff --git a/kernel/fork.c b/kernel/fork.c index 61576b83a032..0ef4c4fa66c1 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -506,7 +506,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, prev = NULL; - retval = mas_entry_count(&mas, oldmm->map_count * 2); + retval = mas_entry_count(&mas, oldmm->map_count); if (retval) goto fail_nomem; @@ -610,7 +610,7 @@ out: mmap_write_unlock(mm); flush_tlb_mm(oldmm); mmap_write_unlock(oldmm); - mas_empty_alloc(&mas); + mas_destroy(&mas); dup_userfaultfd_complete(&uf); fail_uprobe_end: uprobe_end_dup_mmap();