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=189b3d305d0706426f1f6bfe0fcedf4e43afe891;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 476acbf370a85..5e4de4b860439 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();