mm: make dump_page() take a const argument

JIRA: https://issues.redhat.com/browse/RHEL-27745

This patch is a backport of the following upstream commit:
commit b3a3203309c89061452250f7384507787b7badcb
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date:   Tue Feb 27 19:23:32 2024 +0000

    mm: make dump_page() take a const argument

    Now that __dump_page() takes a const argument, we can make dump_page()
    take a const struct page too.

    Link: https://lkml.kernel.org/r/20240227192337.757313-6-willy@infradead.org
    Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Reviewed-by: David Hildenbrand <david@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Rafael Aquini <raquini@redhat.com>
This commit is contained in:
Rafael Aquini 2024-12-09 12:18:19 -05:00
parent 970c1af958
commit 2d94b34867
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ struct vm_area_struct;
struct mm_struct;
struct vma_iterator;
void dump_page(struct page *page, const char *reason);
void dump_page(const struct page *page, const char *reason);
void dump_vma(const struct vm_area_struct *vma);
void dump_mm(const struct mm_struct *mm);
void vma_iter_dump_tree(const struct vma_iterator *vmi);

View File

@ -149,7 +149,7 @@ dump:
__dump_folio(foliop, &precise, pfn, idx);
}
void dump_page(struct page *page, const char *reason)
void dump_page(const struct page *page, const char *reason)
{
if (PagePoisoned(page))
pr_warn("page:%p is uninitialized and poisoned", page);