From 591f968b04b4c18c20fe982263ede94a52f1075e Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Mon, 1 Feb 2021 13:47:49 -0500 Subject: [PATCH] mm/mmap: Use mtree_init() in do_mas_align_munmap() Don't use MTREE_INIT() Signed-off-by: Liam R. Howlett --- mm/mmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 98609612c47e..f44137bacc56 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); /* -- 2.50.1