hugetlb_inline.h 385 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_HUGETLB_INLINE_H
  3. #define _LINUX_HUGETLB_INLINE_H
  4. #ifdef CONFIG_HUGETLB_PAGE
  5. #include <linux/mm.h>
  6. static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
  7. {
  8. return !!(READ_ONCE(vma->vm_flags) & VM_HUGETLB);
  9. }
  10. #else
  11. static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
  12. {
  13. return false;
  14. }
  15. #endif
  16. #endif