[PATCH v1 2/9] mm/mmap: Abstract vma clean up from exit_mmap()

Liam R. Howlett Liam.Howlett at oracle.com
Tue Jan 13 10:50:46 PST 2026


* Suren Baghdasaryan <surenb at google.com> [250909 16:09]:
> On Tue, Sep 9, 2025 at 12:09 PM Liam R. Howlett <Liam.Howlett at oracle.com> wrote:
> >
> > Create the new function tear_down_vmas() to remove a range of vmas.
> > exit_mmap() will be removing all the vmas.
> >
> > This is necessary for future patches.
> >
> > No functional changes intended.
> >
> > Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
> > Signed-off-by: Liam R. Howlett <Liam.Howlett at oracle.com>
> 
> Reviewed-by: Suren Baghdasaryan <surenb at google.com>
> 
> > ---
> >  mm/mmap.c | 37 ++++++++++++++++++++++++-------------
> >  1 file changed, 24 insertions(+), 13 deletions(-)
> >
> > diff --git a/mm/mmap.c b/mm/mmap.c
> > index b07b3ec5e28f5..a290448a53bb2 100644
> > --- a/mm/mmap.c
> > +++ b/mm/mmap.c
> > @@ -1250,6 +1250,29 @@ int vm_brk_flags(unsigned long addr, unsigned long request, vm_flags_t vm_flags)
> >  }
> >  EXPORT_SYMBOL(vm_brk_flags);
> >
> > +static inline
> 
> nit: Maybe let the compiler decide whether to inline this one?

Sure, I'll remove the inline here.

> 
> > +unsigned long tear_down_vmas(struct mm_struct *mm, struct vma_iterator *vmi,
> > +               struct vm_area_struct *vma, unsigned long max)
...

Thanks,
Liam



More information about the maple-tree mailing list