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 | |
| 8 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
| 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 | |
| 15 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
| 16 | { |
| 17 | return 0; |
| 18 | } |
| 19 | |
| 20 | #endif |
| 21 | |
| 22 | #endif |