mm: make dump_page() take a const argument
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 27 Feb 2024 19:23:32 +0000 (19:23 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 6 Mar 2024 21:04:18 +0000 (13:04 -0800)
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>
include/linux/mmdebug.h
mm/debug.c

index 7c3e7b0b0e8fd6e91140d50432cf98eecb253193..39a7714605a7965d1792f557e3ee40a6cf73c4e2 100644 (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);
index 12fed592c9554cb6abc38be7014439bd5978e383..c1c1a6a484e4c07606129ef2731a895fd4ddce41 100644 (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);