-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Naoya Horiguchi
authored and
Andi Kleen
committed
Aug 11, 2010
1 parent
9fe6206
commit 8edf344
Showing
3 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters