X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Fhugetlb.h;h=b4570b62ab8557d9748f7887b878bb341b87c553;hb=d1187ed21026fd512b87851d0ca26d9ae16f9059;hp=a60995afe3348a7ce3ebd0808252679a17164c98;hpb=bef986502fa398b1785a3979b1aa17cd902d3527;p=powerpc.git diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a60995afe3..b4570b62ab 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -4,6 +4,7 @@ #ifdef CONFIG_HUGETLB_PAGE #include +#include #include struct ctl_table; @@ -168,7 +169,12 @@ void hugetlb_put_quota(struct address_space *mapping); static inline int is_file_hugepages(struct file *file) { - return file->f_op == &hugetlbfs_file_operations; + if (file->f_op == &hugetlbfs_file_operations) + return 1; + if (is_file_shm_hugepages(file)) + return 1; + + return 0; } static inline void set_file_hugepages(struct file *file) @@ -183,4 +189,10 @@ static inline void set_file_hugepages(struct file *file) #endif /* !CONFIG_HUGETLBFS */ +#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA +unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, + unsigned long len, unsigned long pgoff, + unsigned long flags); +#endif /* HAVE_ARCH_HUGETLB_UNMAPPED_AREA */ + #endif /* _LINUX_HUGETLB_H */