[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAIddlu9x5RTZT8k@harry>
Date: Fri, 18 Apr 2025 18:37:58 +0900
From: Harry Yoo <harry.yoo@...cle.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Ye Liu <ye.liu@...ux.dev>, akpm@...ux-foundation.org, linmiaohe@...wei.com,
nao.horiguchi@...il.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Ye Liu <liuye@...inos.cn>,
David Hildenbrand <david@...hat.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, Rik van Riel <riel@...riel.com>
Subject: Re: [PATCH 1/3] mm/rmap: rename page__anon_vma to page_anon_vma for
consistency
On Fri, Apr 18, 2025 at 10:14:25AM +0100, Lorenzo Stoakes wrote:
> On Fri, Apr 18, 2025 at 03:52:24PM +0800, Ye Liu wrote:
> > From: Ye Liu <liuye@...inos.cn>
> >
> > Renamed local variable page__anon_vma in page_address_in_vma() to
> > page_anon_vma. The previous naming convention of using double underscores
> > (__) is unnecessary and inconsistent with typical kernel style, which uses
> > single underscores to denote local variables. Also updated comments to
> > reflect the new variable name.
> >
> > Functionality unchanged.
> >
> > Signed-off-by: Ye Liu <liuye@...inos.cn>
>
> Thanks, this looks good. I don't know why we named it this way :)
At that time there was page_anon_vma() instead of folio_anon_vma()
so the author couldn't name the variable page_anon_vma :)
--
Cheers,
Harry / Hyeonggon
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
>
> > ---
> > mm/rmap.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/mm/rmap.c b/mm/rmap.c
> > index 67bb273dfb80..b509c226e50d 100644
> > --- a/mm/rmap.c
> > +++ b/mm/rmap.c
> > @@ -789,13 +789,13 @@ unsigned long page_address_in_vma(const struct folio *folio,
> > const struct page *page, const struct vm_area_struct *vma)
> > {
> > if (folio_test_anon(folio)) {
> > - struct anon_vma *page__anon_vma = folio_anon_vma(folio);
> > + struct anon_vma *page_anon_vma = folio_anon_vma(folio);
> > /*
> > * Note: swapoff's unuse_vma() is more efficient with this
> > * check, and needs it to match anon_vma when KSM is active.
> > */
> > - if (!vma->anon_vma || !page__anon_vma ||
> > - vma->anon_vma->root != page__anon_vma->root)
> > + if (!vma->anon_vma || !page_anon_vma ||
> > + vma->anon_vma->root != page_anon_vma->root)
> > return -EFAULT;
> > } else if (!vma->vm_file) {
> > return -EFAULT;
> > @@ -803,7 +803,7 @@ unsigned long page_address_in_vma(const struct folio *folio,
> > return -EFAULT;
> > }
> >
> > - /* KSM folios don't reach here because of the !page__anon_vma check */
> > + /* KSM folios don't reach here because of the !page_anon_vma check */
> > return vma_address(vma, page_pgoff(folio, page), 1);
> > }
> >
> > --
> > 2.25.1
> >
Powered by blists - more mailing lists