]> git.ipfire.org Git - thirdparty/linux.git/commit - mm/mmap.c
mm/mmap: remove preallocation from do_mas_align_munmap()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 20 Jan 2023 16:26:12 +0000 (11:26 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 10 Feb 2023 00:51:32 +0000 (16:51 -0800)
commit0378c0a0e9e463b9e31b94fbbbc10f94b34225b6
tree53924f55c2bb2787106ae1a8135f0c54ad95c3b4
parent79e4f2caa4401e56f8df34f658c43bacddc0ae03
mm/mmap: remove preallocation from do_mas_align_munmap()

In preparation of passing the vma state through split, the pre-allocation
that occurs before the split has to be moved to after.  Since the
preallocation would then live right next to the store, just call store
instead of preallocating.  This effectively restores the potential error
path of splitting and not munmap'ing which pre-dates the maple tree.

Link: https://lkml.kernel.org/r/20230120162650.984577-12-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c