Naoya Horiguchi | 8edf344 | 2010-05-28 09:29:15 +0900 | [diff] [blame] | 1 | #ifndef _LINUX_HUGETLB_INLINE_H |
Naoya Horiguchi | e3390f6 | 2010-06-15 13:18:13 +0900 | [diff] [blame] | 2 | #define _LINUX_HUGETLB_INLINE_H |
Naoya Horiguchi | 8edf344 | 2010-05-28 09:29:15 +0900 | [diff] [blame] | 3 | |
Naoya Horiguchi | e3390f6 | 2010-06-15 13:18:13 +0900 | [diff] [blame] | 4 | #ifdef CONFIG_HUGETLB_PAGE |
Naoya Horiguchi | 8edf344 | 2010-05-28 09:29:15 +0900 | [diff] [blame] | 5 | |
6 | #include <linux/mm.h> | ||||
7 | |||||
Yaowei Bai | 32f6271 | 2016-05-19 17:11:23 -0700 | [diff] [blame] | 8 | static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma) |
Naoya Horiguchi | 8edf344 | 2010-05-28 09:29:15 +0900 | [diff] [blame] | 9 | { |
KOSAKI Motohiro | ca16d14 | 2011-05-26 19:16:19 +0900 | [diff] [blame] | 10 | return !!(vma->vm_flags & VM_HUGETLB); |
Naoya Horiguchi | 8edf344 | 2010-05-28 09:29:15 +0900 | [diff] [blame] | 11 | } |
12 | |||||
13 | #else | ||||
14 | |||||
Yaowei Bai | 32f6271 | 2016-05-19 17:11:23 -0700 | [diff] [blame] | 15 | static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma) |
Naoya Horiguchi | 8edf344 | 2010-05-28 09:29:15 +0900 | [diff] [blame] | 16 | { |
Yaowei Bai | 32f6271 | 2016-05-19 17:11:23 -0700 | [diff] [blame] | 17 | return false; |
Naoya Horiguchi | 8edf344 | 2010-05-28 09:29:15 +0900 | [diff] [blame] | 18 | } |
19 | |||||
20 | #endif | ||||
21 | |||||
22 | #endif |