diff options
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r-- | include/linux/page-flags.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 907f1605926b..4ca1241ef94e 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -410,11 +410,32 @@ static inline void ClearPageCompound(struct page *page) | |||
410 | #endif /* !PAGEFLAGS_EXTENDED */ | 410 | #endif /* !PAGEFLAGS_EXTENDED */ |
411 | 411 | ||
412 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 412 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
413 | /* | ||
414 | * PageHuge() only returns true for hugetlbfs pages, but not for | ||
415 | * normal or transparent huge pages. | ||
416 | * | ||
417 | * PageTransHuge() returns true for both transparent huge and | ||
418 | * hugetlbfs pages, but not normal pages. PageTransHuge() can only be | ||
419 | * called only in the core VM paths where hugetlbfs pages can't exist. | ||
420 | */ | ||
421 | static inline int PageTransHuge(struct page *page) | ||
422 | { | ||
423 | VM_BUG_ON(PageTail(page)); | ||
424 | return PageHead(page); | ||
425 | } | ||
426 | |||
413 | static inline int PageTransCompound(struct page *page) | 427 | static inline int PageTransCompound(struct page *page) |
414 | { | 428 | { |
415 | return PageCompound(page); | 429 | return PageCompound(page); |
416 | } | 430 | } |
431 | |||
417 | #else | 432 | #else |
433 | |||
434 | static inline int PageTransHuge(struct page *page) | ||
435 | { | ||
436 | return 0; | ||
437 | } | ||
438 | |||
418 | static inline int PageTransCompound(struct page *page) | 439 | static inline int PageTransCompound(struct page *page) |
419 | { | 440 | { |
420 | return 0; | 441 | return 0; |