diff options
| -rw-r--r-- | include/linux/hugetlb.h | 11 | ||||
| -rw-r--r-- | include/linux/hugetlb_inline.h | 22 | ||||
| -rw-r--r-- | include/linux/pagemap.h | 1 |
3 files changed, 24 insertions, 10 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 78b4bc64c006..d47a7c41745d 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_HUGETLB_H | 2 | #define _LINUX_HUGETLB_H |
| 3 | 3 | ||
| 4 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
| 5 | #include <linux/hugetlb_inline.h> | ||
| 5 | 6 | ||
| 6 | struct ctl_table; | 7 | struct ctl_table; |
| 7 | struct user_struct; | 8 | struct user_struct; |
| @@ -14,11 +15,6 @@ struct user_struct; | |||
| 14 | 15 | ||
| 15 | int PageHuge(struct page *page); | 16 | int PageHuge(struct page *page); |
| 16 | 17 | ||
| 17 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | ||
| 18 | { | ||
| 19 | return vma->vm_flags & VM_HUGETLB; | ||
| 20 | } | ||
| 21 | |||
| 22 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); | 18 | void reset_vma_resv_huge_pages(struct vm_area_struct *vma); |
| 23 | int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); | 19 | int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
| 24 | int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); | 20 | int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
| @@ -77,11 +73,6 @@ static inline int PageHuge(struct page *page) | |||
| 77 | return 0; | 73 | return 0; |
| 78 | } | 74 | } |
| 79 | 75 | ||
| 80 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | ||
| 81 | { | ||
| 82 | return 0; | ||
| 83 | } | ||
| 84 | |||
| 85 | static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) | 76 | static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) |
| 86 | { | 77 | { |
| 87 | } | 78 | } |
diff --git a/include/linux/hugetlb_inline.h b/include/linux/hugetlb_inline.h new file mode 100644 index 000000000000..cf00b6df53dc --- /dev/null +++ b/include/linux/hugetlb_inline.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef _LINUX_HUGETLB_INLINE_H | ||
| 2 | #define _LINUX_HUGETLB_INLINE_H 1 | ||
| 3 | |||
| 4 | #ifdef CONFIG_HUGETLBFS | ||
| 5 | |||
| 6 | #include <linux/mm.h> | ||
| 7 | |||
| 8 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | ||
| 9 | { | ||
| 10 | return vma->vm_flags & VM_HUGETLB; | ||
| 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 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 3c62ed408492..b2bd2bae9775 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/gfp.h> | 13 | #include <linux/gfp.h> |
| 14 | #include <linux/bitops.h> | 14 | #include <linux/bitops.h> |
| 15 | #include <linux/hardirq.h> /* for in_interrupt() */ | 15 | #include <linux/hardirq.h> /* for in_interrupt() */ |
| 16 | #include <linux/hugetlb_inline.h> | ||
| 16 | 17 | ||
| 17 | /* | 18 | /* |
| 18 | * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page | 19 | * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page |
