From: Liam R. Howlett Date: Mon, 1 Feb 2021 18:47:49 +0000 (-0500) Subject: mm/mmap: Use mtree_init() in do_mas_align_munmap() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=591f968b04b4c18c20fe982263ede94a52f1075e;p=users%2Fjedix%2Flinux-maple.git mm/mmap: Use mtree_init() in do_mas_align_munmap() Don't use MTREE_INIT() Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index 98609612c47ed..f44137bacc560 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2360,9 +2360,9 @@ int do_mas_align_munmap(struct ma_state *mas, struct vm_area_struct *vma, unsigned long end, struct list_head *uf, bool downgrade) { struct vm_area_struct *prev, *last; - struct maple_tree mt_detach = MTREE_INIT(mt_detach, MAPLE_ALLOC_RANGE); + struct maple_tree mt_detach; unsigned long max; - MA_STATE(dst, &mt_detach, start, start); + MA_STATE(dst, NULL, start, start); struct ma_state tmp; /* we have start < vma->vm_end */ @@ -2434,6 +2434,8 @@ int do_mas_align_munmap(struct ma_state *mas, struct vm_area_struct *vma, } /* Point of no return */ + mtree_init(&mt_detach, MAPLE_ALLOC_RANGE); + dst.tree = &mt_detach; max = detach_range(mm, mas, &dst, vma, prev, &last); /*