mm: minor cleanups in rmap
Subsystems (2)
v3 cover mm: minor cleanups in rmap
From: Ye Liu <[email protected]>
Minor cleanups in mm/rmap.c:
- Rename a local variable for consistency
- Fix a typo in a comment
No functional changes.
Changes in v3:
- Rename variable from page_anon_vma to anon_vma.
- Link to v2: https://lore.kernel.org/all/[email protected]/
Changes in v2:
- Dropped the "mm/memory-failure" patch.
- Kept only the uncontroversial rmap cleanups.
- Link to v1: https://lore.kernel.org/all/[email protected]/
Ye Liu (2):
mm/rmap: rename page__anon_vma to anon_vma for consistency mm/rmap: fix typo in comment in page_address_in_vma
mm/rmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.25.1
PATCH v3 1/2 mm/rmap: rename page__anon_vma to anon_vma for consistency
From: Ye Liu <[email protected]>
Renamed 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.
--- mm/rmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
mm/rmap.c +4 -4
@@ -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 *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 || !anon_vma || + vma->anon_vma->root != 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 !anon_vma check */ return vma_address (vma,page_pgoff (folio, page),1 ); }
Signature · 1 line
2.25.1
PATCH v3 2/2 mm/rmap: fix typo in comment in page_address_in_vma
In reply to Ye LiuFrom: Ye Liu <[email protected]>
Fixes a minor typo in the comment above page_address_in_vma():
"responsibililty" → "responsibility"
--- mm/rmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/rmap.c +1 -1
@@ -774,7 +774,7 @@ static bool should_defer_flush(struct mm_struct *mm, enum ttu_flags flags)* @vma: The VMA we need to know the address in. * * Calculates the user virtual address of this page in the specified VMA. -* It is the caller's responsibililty to check the page is actually +* It is the caller's responsibility to check the page is actually * within the VMA. There may not currently be a PTE pointing at this * page, but if a page fault occurs at this address, this is the page * which will be accessed.
Signature · 1 line
2.25.1
Quoted 18 lines · Ye Liu
From: Ye Liu <[email protected]>
Minor cleanups in
mm/rmap.c:- Rename a local variable for consistency
- Fix a typo in a commentNo functional changes.
Changes in v3:
- Rename variable frompage_anon_vmatoanon_vma.
- Link to v2: https://lore.kernel.org/all/[email protected]/Changes in v2:
- Dropped the "mm/memory-failure" patch.
- Kept only the uncontroversial rmap cleanups.
- Link to v1: https://lore.kernel.org/all/[email protected]/
Quoted 8 lines
Ye Liu (2):
mm/rmap: renamepage__anon_vmatoanon_vmafor consistency mm/rmap: fix typo in comment inpage_address_in_vmamm/rmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
For the series:
LGTM,
Thanks!
Signature · 2 lines
Cheers, Harry / Hyeonggon