https://github.com/torvalds/linux
Raw File
Tip revision: af2d861d4cd2a4da5137f795ee3509e6f944a25b authored by Linus Torvalds on 24 April 2022, 21:51:22 UTC
Linux 5.18-rc4
Tip revision: af2d861
hugetlb_inline.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_HUGETLB_INLINE_H
#define _LINUX_HUGETLB_INLINE_H

#ifdef CONFIG_HUGETLB_PAGE

#include <linux/mm.h>

static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
{
	return !!(vma->vm_flags & VM_HUGETLB);
}

#else

static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
{
	return false;
}

#endif

#endif
back to top