mirror of
https://gitee.com/open-loongarch/linux-6.12.git
synced 2026-10-25 12:37:11 +08:00
hugetlb:fix build error
the error message is as follow:
../arch/loongarch/mm/mmap.c: In function ‘arch_get_unmapped_area_common’:
../arch/loongarch/mm/mmap.c:69:35: error: implicit declaration of function ‘huge_page_mask_align’; did you mean ‘huge_page_mask’? [-Werror=implicit-function-declaration]
69 | info.align_mask = huge_page_mask_align(filp);
| ^~~~~~~~~~~~~~~~~~~~
| huge_page_mask
cc1: some warnings being treated as errors
code sync for linux-6.13
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
@@ -1035,6 +1035,11 @@ void hugetlb_unregister_node(struct node *node);
|
||||
*/
|
||||
bool is_raw_hwpoison_page_in_hugepage(struct page *page);
|
||||
|
||||
static inline unsigned long huge_page_mask_align(struct file *file)
|
||||
{
|
||||
return PAGE_MASK & ~huge_page_mask(hstate_file(file));
|
||||
}
|
||||
|
||||
#else /* CONFIG_HUGETLB_PAGE */
|
||||
struct hstate {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user