Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/rmap: rename page__anon_vma to anon_vma for consistency

Patch series "mm: minor cleanups in rmap", v3.

Minor cleanups in mm/rmap.c:

- Rename a local variable for consistency
- Fix a typo in a comment

No functional changes.


This patch (of 2):

Rename local variable page__anon_vma in page_address_in_vma() to 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.

Link: https://lkml.kernel.org/r/20250421085729.127845-1-ye.liu@linux.dev
Link: https://lkml.kernel.org/r/20250421085729.127845-2-ye.liu@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Liu Ye <liuye@kylinos.cn>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Ye Liu and committed by
Andrew Morton
f04cc63d a73dbc85

+4 -4
+4 -4
mm/rmap.c
··· 789 789 const struct page *page, const struct vm_area_struct *vma) 790 790 { 791 791 if (folio_test_anon(folio)) { 792 - struct anon_vma *page__anon_vma = folio_anon_vma(folio); 792 + struct anon_vma *anon_vma = folio_anon_vma(folio); 793 793 /* 794 794 * Note: swapoff's unuse_vma() is more efficient with this 795 795 * check, and needs it to match anon_vma when KSM is active. 796 796 */ 797 - if (!vma->anon_vma || !page__anon_vma || 798 - vma->anon_vma->root != page__anon_vma->root) 797 + if (!vma->anon_vma || !anon_vma || 798 + vma->anon_vma->root != anon_vma->root) 799 799 return -EFAULT; 800 800 } else if (!vma->vm_file) { 801 801 return -EFAULT; ··· 803 803 return -EFAULT; 804 804 } 805 805 806 - /* KSM folios don't reach here because of the !page__anon_vma check */ 806 + /* KSM folios don't reach here because of the !anon_vma check */ 807 807 return vma_address(vma, page_pgoff(folio, page), 1); 808 808 } 809 809