Skip to content

Commit

Permalink
mm: make dump_page() take a const argument
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Wilcox (Oracle) authored and akpm00 committed Mar 6, 2024
1 parent fae7d83 commit b3a3203
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/mmdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion mm/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static void __dump_page(const struct page *page)
__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);
Expand Down

0 comments on commit b3a3203

Please sign in to comment.