diff options
Diffstat (limited to 'include/linux/page-isolation.h')
-rw-r--r-- | include/linux/page-isolation.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h index a92061e08d48..3fff8e774067 100644 --- a/include/linux/page-isolation.h +++ b/include/linux/page-isolation.h | |||
@@ -1,6 +1,25 @@ | |||
1 | #ifndef __LINUX_PAGEISOLATION_H | 1 | #ifndef __LINUX_PAGEISOLATION_H |
2 | #define __LINUX_PAGEISOLATION_H | 2 | #define __LINUX_PAGEISOLATION_H |
3 | 3 | ||
4 | #ifdef CONFIG_MEMORY_ISOLATION | ||
5 | static inline bool is_migrate_isolate_page(struct page *page) | ||
6 | { | ||
7 | return get_pageblock_migratetype(page) == MIGRATE_ISOLATE; | ||
8 | } | ||
9 | static inline bool is_migrate_isolate(int migratetype) | ||
10 | { | ||
11 | return migratetype == MIGRATE_ISOLATE; | ||
12 | } | ||
13 | #else | ||
14 | static inline bool is_migrate_isolate_page(struct page *page) | ||
15 | { | ||
16 | return false; | ||
17 | } | ||
18 | static inline bool is_migrate_isolate(int migratetype) | ||
19 | { | ||
20 | return false; | ||
21 | } | ||
22 | #endif | ||
4 | 23 | ||
5 | bool has_unmovable_pages(struct zone *zone, struct page *page, int count, | 24 | bool has_unmovable_pages(struct zone *zone, struct page *page, int count, |
6 | bool skip_hwpoisoned_pages); | 25 | bool skip_hwpoisoned_pages); |