android_kernel_motorola_sm6225/include/linux/hugetlb_inline.h
Naoya Horiguchi 8edf344c66 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>
2010-08-11 09:20:41 +02:00

22 lines
324 B
C

#ifndef _LINUX_HUGETLB_INLINE_H
#define _LINUX_HUGETLB_INLINE_H 1
#ifdef CONFIG_HUGETLBFS
#include <linux/mm.h>
static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
{
return vma->vm_flags & VM_HUGETLB;
}
#else
static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
{
return 0;
}
#endif
#endif