From: Yeoreum Yun <yeoreum.yun@arm.com>
To: "Liam R. Howlett" <liam@infradead.org>
Cc: Yeoreum Yun <yeoreum.yun@arm.com>, Jason Gunthorpe <jgg@ziepe.ca>,
John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
linux-mm@kvack.org, Jan Kara <jack@suse.cz>,
Josef Bacik <josef@toxicpanda.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Jann Horn <jannh@google.com>,
Pedro Falcato <pfalcato@suse.de>,
David Hildenbrand <david@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Harrison Crosse <harrison@crosse.dev>
Subject: Re: [PATCH 2/3] mm: gup: remove unused argument in populate_vma_page_range()
Date: Fri, 4 Dec 2026 08:41:16 +0000 [thread overview]
Message-ID: <axJ8rKrv_3kVDc7x@e129823.arm.com> (raw)
In-Reply-To: <3og3p45fvxyq6lzumt6v4oncaeg5ramgo2vkyaoggjiehql3n4@egk2i32d27f4>
On Thu, Dec 03, 2026 at 10:28:55PM -0500, Liam R. Howlett wrote:
> On 26/12/03 03:17PM, Yeoreum Yun wrote:
> > Current users of populate_vma_page_range() set locked argument as NULL
> > always. Therefore, remove locked argument from it.
> >
> > Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
>
> Nit, the argument is used, it's just always passed through as null.
>
> This also sounds like you found an existing issue, but you've removed
> the last caller that used to pass a non-NULL argument here.
Okay. I'll reparse the commit message.
>
> The code looks good, though.
Thanks.
>
> > ---
> > mm/gup.c | 4 ++--
> > mm/internal.h | 2 +-
> > mm/mmap.c | 4 ++--
> > mm/mprotect.c | 2 +-
> > 4 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/mm/gup.c b/mm/gup.c
> > index d2ff0b667e37..4c0d00c37c21 100644
> > --- a/mm/gup.c
> > +++ b/mm/gup.c
> > @@ -1966,9 +1966,9 @@ static long __populate_vma_page_range(struct vm_area_struct *vma,
> >
> >
> > long populate_vma_page_range(struct vm_area_struct *vma,
> > - unsigned long start, unsigned long end, int *locked)
> > + unsigned long start, unsigned long end)
> > {
> > - return __populate_vma_page_range(vma, start, end, locked, false);
> > + return __populate_vma_page_range(vma, start, end, NULL, false);
> > }
> >
> > /*
> > diff --git a/mm/internal.h b/mm/internal.h
> > index 2132dd593b44..6d1dccd03284 100644
> > --- a/mm/internal.h
> > +++ b/mm/internal.h
> > @@ -945,7 +945,7 @@ struct anon_vma *folio_anon_vma(const struct folio *folio);
> > #ifdef CONFIG_MMU
> > void unmap_mapping_folio(struct folio *folio);
> > extern long populate_vma_page_range(struct vm_area_struct *vma,
> > - unsigned long start, unsigned long end, int *locked);
> > + unsigned long start, unsigned long end);
> > extern long faultin_page_range(struct mm_struct *mm, unsigned long start,
> > unsigned long end, bool write, int *locked);
> > bool mlock_future_ok(const struct mm_struct *mm, bool is_vma_locked,
> > diff --git a/mm/mmap.c b/mm/mmap.c
> > index 7618e72766a5..4b104217a153 100644
> > --- a/mm/mmap.c
> > +++ b/mm/mmap.c
> > @@ -986,7 +986,7 @@ struct vm_area_struct *find_extend_vma_locked(struct mm_struct *mm, unsigned lon
> > if (expand_stack_locked(prev, addr))
> > return NULL;
> > if (vma_test(prev, VMA_LOCKED_BIT))
> > - populate_vma_page_range(prev, addr, prev->vm_end, NULL);
> > + populate_vma_page_range(prev, addr, prev->vm_end);
> > return prev;
> > }
> > #else
> > @@ -1010,7 +1010,7 @@ struct vm_area_struct *find_extend_vma_locked(struct mm_struct *mm, unsigned lon
> > if (expand_stack_locked(vma, addr))
> > return NULL;
> > if (vma_test(vma, VMA_LOCKED_BIT))
> > - populate_vma_page_range(vma, addr, start, NULL);
> > + populate_vma_page_range(vma, addr, start);
> > return vma;
> > }
> > #endif
> > diff --git a/mm/mprotect.c b/mm/mprotect.c
> > index e18d4e12fc34..209efa869174 100644
> > --- a/mm/mprotect.c
> > +++ b/mm/mprotect.c
> > @@ -851,7 +851,7 @@ mprotect_fixup(struct vma_iterator *vmi, struct mmu_gather *tlb,
> > if (vma_flags_test(&new_vma_flags, VMA_WRITE_BIT) &&
> > vma_flags_test(&old_vma_flags, VMA_LOCKED_BIT) &&
> > !vma_flags_test_any(&old_vma_flags, VMA_WRITE_BIT, VMA_SHARED_BIT))
> > - populate_vma_page_range(vma, start, end, NULL);
> > + populate_vma_page_range(vma, start, end);
> >
> > vm_stat_account(mm, vma_flags_to_legacy(old_vma_flags), -nrpages);
> > newflags = vma_flags_to_legacy(new_vma_flags);
> >
> > --
> > 2.43.0
> >
--
Sincerely,
Yeoreum Yun
next prev parent reply other threads:[~2026-12-04 8:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 15:17 [PATCH 0/3] mm: gup: handle fault retries in __mm_populate() Yeoreum Yun
2026-12-03 15:17 ` [PATCH 1/3] " Yeoreum Yun
2026-12-04 3:23 ` Liam R. Howlett
2026-12-04 8:30 ` Yeoreum Yun
2026-12-04 5:29 ` kernel test robot
2026-12-03 15:17 ` [PATCH 2/3] mm: gup: remove unused argument in populate_vma_page_range() Yeoreum Yun
2026-12-04 3:28 ` Liam R. Howlett
2026-12-04 8:41 ` Yeoreum Yun [this message]
2026-12-03 15:17 ` [PATCH 3/3] mm: gup: make mmap_lock acquisition in __mm_populate() killable Yeoreum Yun
2026-12-04 3:35 ` Liam R. Howlett
2026-12-04 8:38 ` Yeoreum Yun
2026-12-04 3:23 ` [PATCH 0/3] mm: gup: handle fault retries in __mm_populate() Liam R. Howlett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=axJ8rKrv_3kVDc7x@e129823.arm.com \
--to=yeoreum.yun@arm.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=harrison@crosse.dev \
--cc=jack@suse.cz \
--cc=jannh@google.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=josef@toxicpanda.com \
--cc=liam@infradead.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=peterx@redhat.com \
--cc=pfalcato@suse.de \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox