mm/vma: change munmap to use vma_munmap_struct() for accounting and surrounding vmas
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Aug 2024 04:00:46 +0000 (00:00 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Sep 2024 04:15:49 +0000 (21:15 -0700)
commit17f1ae9b40c6b03760ca937c53e7f0d38c2613a2
tree6a17079ed204b4b03c3f88d1bd947df1b90e7c4c
parentdba14840905f9ecaad0b3a261e4d7a88120c8c7a
mm/vma: change munmap to use vma_munmap_struct() for accounting and surrounding vmas

Clean up the code by changing the munmap operation to use a structure for
the accounting and munmap variables.

Since remove_mt() is only called in one location and the contents will be
reduced to almost nothing.  The remains of the function can be added to
vms_complete_munmap_vmas().

Link: https://lkml.kernel.org/r/20240830040101.822209-7-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Bert Karwatzki <spasswolf@web.de>
Cc: Jeff Xu <jeffxu@chromium.org>
Cc: Jiri Olsa <olsajiri@gmail.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vma.c
mm/vma.h