blob: 0660a03d37d986c8167dbdb5086acaa96dc17a99 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Naoya Horiguchi8edf3442010-05-28 09:29:15 +09002#ifndef _LINUX_HUGETLB_INLINE_H
Naoya Horiguchie3390f62010-06-15 13:18:13 +09003#define _LINUX_HUGETLB_INLINE_H
Naoya Horiguchi8edf3442010-05-28 09:29:15 +09004
Naoya Horiguchie3390f62010-06-15 13:18:13 +09005#ifdef CONFIG_HUGETLB_PAGE
Naoya Horiguchi8edf3442010-05-28 09:29:15 +09006
7#include <linux/mm.h>
8
Yaowei Bai32f62712016-05-19 17:11:23 -07009static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
Naoya Horiguchi8edf3442010-05-28 09:29:15 +090010{
KOSAKI Motohiroca16d142011-05-26 19:16:19 +090011 return !!(vma->vm_flags & VM_HUGETLB);
Naoya Horiguchi8edf3442010-05-28 09:29:15 +090012}
13
14#else
15
Yaowei Bai32f62712016-05-19 17:11:23 -070016static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
Naoya Horiguchi8edf3442010-05-28 09:29:15 +090017{
Yaowei Bai32f62712016-05-19 17:11:23 -070018 return false;
Naoya Horiguchi8edf3442010-05-28 09:29:15 +090019}
20
21#endif
22
23#endif