Message ID | 20220512174551.81279-1-shy828301@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] mm: rmap: use the correct parameter name for DEFINE_PAGE_VMA_WALK | expand |
On Thu, May 12, 2022 at 10:45:50AM -0700, Yang Shi wrote: > The parameter used by DEFINE_PAGE_VMA_WALK is _page not page, fix the > parameter name. It didn't cause any build error, it is probably because > the only caller is write_protect_page() from ksm.c, which pass in page. > > Fixes: 2aff7a4755be ("mm: Convert page_vma_mapped_walk to work on PFNs") > Signed-off-by: Yang Shi <shy828301@gmail.com> Oops. Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
On Fri, May 13, 2022 at 1:45 AM Yang Shi <shy828301@gmail.com> wrote: > > The parameter used by DEFINE_PAGE_VMA_WALK is _page not page, fix the > parameter name. It didn't cause any build error, it is probably because > the only caller is write_protect_page() from ksm.c, which pass in page. > > Fixes: 2aff7a4755be ("mm: Convert page_vma_mapped_walk to work on PFNs") > Signed-off-by: Yang Shi <shy828301@gmail.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Thanks
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index cbe279a6f0de..d4f1c0bdd084 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -320,8 +320,8 @@ struct page_vma_mapped_walk { #define DEFINE_PAGE_VMA_WALK(name, _page, _vma, _address, _flags) \ struct page_vma_mapped_walk name = { \ .pfn = page_to_pfn(_page), \ - .nr_pages = compound_nr(page), \ - .pgoff = page_to_pgoff(page), \ + .nr_pages = compound_nr(_page), \ + .pgoff = page_to_pgoff(_page), \ .vma = _vma, \ .address = _address, \ .flags = _flags, \
The parameter used by DEFINE_PAGE_VMA_WALK is _page not page, fix the parameter name. It didn't cause any build error, it is probably because the only caller is write_protect_page() from ksm.c, which pass in page. Fixes: 2aff7a4755be ("mm: Convert page_vma_mapped_walk to work on PFNs") Signed-off-by: Yang Shi <shy828301@gmail.com> --- include/linux/rmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)