Re: [PATCH 1/2] mm/mlock: not handle NULL vma specially

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 8, 2022 at 5:03 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed,  4 May 2022 00:39:57 +0000 Wei Yang <richard.weiyang@xxxxxxxxx> wrote:
>
> > If we can't find a proper vma, the loop would terminate as expected.
> >
> > It's not necessary to handle it specially.
> >
> > ...
> >
> > --- a/mm/mlock.c
> > +++ b/mm/mlock.c
> > @@ -504,11 +504,7 @@ static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm,
> >       if (mm == NULL)
> >               mm = current->mm;
> >
> > -     vma = find_vma(mm, start);
> > -     if (vma == NULL)
> > -             return 0;
> > -
> > -     for (; vma ; vma = vma->vm_next) {
> > +     for (vma = find_vma(mm, start); vma ; vma = vma->vm_next) {
> >               if (start >= vma->vm_end)
> >                       continue;
> >               if (start + len <=  vma->vm_start)
>
> The mapletree patches mangle this code a lot.
>
> Please take a look at linux-next or the mm-unstabe branch at
> git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm early to mid next
> week, see if you see anything which should be addressed.
>

I took a look at mm-unstabe branch with last commit

  2b58b3f33ba2 mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()

Function count_mm_mlocked_page_nr() looks not changed.

Do I need to rebase on top of it?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux