Commit 6e65aa55 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Andrew Morton

mm: make page_ext_get() take a const argument

In order to constify other functions, we need page_ext_get() to be const. 
This is no problem as lookup_page_ext() already takes a const argument.

Link: https://lkml.kernel.org/r/20240326171045.410737-4-willy@infradead.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent fa92722e
...@@ -77,7 +77,7 @@ static inline void page_ext_init(void) ...@@ -77,7 +77,7 @@ static inline void page_ext_init(void)
} }
#endif #endif
extern struct page_ext *page_ext_get(struct page *page); extern struct page_ext *page_ext_get(const struct page *page);
extern void page_ext_put(struct page_ext *page_ext); extern void page_ext_put(struct page_ext *page_ext);
static inline void *page_ext_data(struct page_ext *page_ext, static inline void *page_ext_data(struct page_ext *page_ext,
...@@ -117,7 +117,7 @@ static inline void page_ext_init_flatmem(void) ...@@ -117,7 +117,7 @@ static inline void page_ext_init_flatmem(void)
{ {
} }
static inline struct page_ext *page_ext_get(struct page *page) static inline struct page_ext *page_ext_get(const struct page *page)
{ {
return NULL; return NULL;
} }
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include <linux/page_ext.h> #include <linux/page_ext.h>
extern struct page_ext_operations page_alloc_tagging_ops; extern struct page_ext_operations page_alloc_tagging_ops;
extern struct page_ext *page_ext_get(struct page *page);
extern void page_ext_put(struct page_ext *page_ext);
static inline union codetag_ref *codetag_ref_from_page_ext(struct page_ext *page_ext) static inline union codetag_ref *codetag_ref_from_page_ext(struct page_ext *page_ext)
{ {
......
...@@ -514,7 +514,7 @@ void __meminit pgdat_page_ext_init(struct pglist_data *pgdat) ...@@ -514,7 +514,7 @@ void __meminit pgdat_page_ext_init(struct pglist_data *pgdat)
* Context: Any context. Caller may not sleep until they have called * Context: Any context. Caller may not sleep until they have called
* page_ext_put(). * page_ext_put().
*/ */
struct page_ext *page_ext_get(struct page *page) struct page_ext *page_ext_get(const struct page *page)
{ {
struct page_ext *page_ext; struct page_ext *page_ext;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment