Pull asus into release branch
[pandora-kernel.git] / include / linux / hugetlb.h
index ace64e5..3f3e7a6 100644 (file)
@@ -4,6 +4,7 @@
 #ifdef CONFIG_HUGETLB_PAGE
 
 #include <linux/mempolicy.h>
+#include <linux/shm.h>
 #include <asm/tlbflush.h>
 
 struct ctl_table;
@@ -35,6 +36,7 @@ extern int sysctl_hugetlb_shm_group;
 
 pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr);
 pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr);
+int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep);
 struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address,
                              int write);
 struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
@@ -167,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)