1 #ifndef __LINUX_PAGE_OWNER_H
2 #define __LINUX_PAGE_OWNER_H
4 #ifdef CONFIG_PAGE_OWNER
5 extern bool page_owner_inited;
6 extern struct page_ext_operations page_owner_ops;
8 extern void __reset_page_owner(struct page *page, unsigned int order);
9 extern void __set_page_owner(struct page *page,
10 unsigned int order, gfp_t gfp_mask);
11 extern gfp_t __get_page_owner_gfp(struct page *page);
13 static inline void reset_page_owner(struct page *page, unsigned int order)
15 if (likely(!page_owner_inited))
18 __reset_page_owner(page, order);
21 static inline void set_page_owner(struct page *page,
22 unsigned int order, gfp_t gfp_mask)
24 if (likely(!page_owner_inited))
27 __set_page_owner(page, order, gfp_mask);
30 static inline gfp_t get_page_owner_gfp(struct page *page)
32 if (likely(!page_owner_inited))
35 return __get_page_owner_gfp(page);
38 static inline void reset_page_owner(struct page *page, unsigned int order)
41 static inline void set_page_owner(struct page *page,
42 unsigned int order, gfp_t gfp_mask)
45 static inline gfp_t get_page_owner_gfp(struct page *page)
50 #endif /* CONFIG_PAGE_OWNER */
51 #endif /* __LINUX_PAGE_OWNER_H */