diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2010-05-27 20:29:15 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-08-11 03:20:41 -0400 |
commit | 8edf344c66a3f214d709dad1421c29d678915b3f (patch) | |
tree | 0b976d0c52ac5efddcd30c8cb60e44b2cc0029e2 /include/linux/hugetlb_inline.h | |
parent | 9fe6206f400646a2322096b56c59891d530e8d51 (diff) |
hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.h
is_vm_hugetlb_page() is a widely used inline function to insert hooks
into hugetlb code.
But we can't use it in pagemap.h because of circular dependency of
the header files. This patch removes this limitation.
Acked-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'include/linux/hugetlb_inline.h')
-rw-r--r-- | include/linux/hugetlb_inline.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 | ||