kernel.h: drop inclusion in bitmap.h
[linux-2.6-microblaze.git] / include / linux / khugepaged.h
index c941b73..2fcc018 100644 (file)
@@ -3,6 +3,7 @@
 #define _LINUX_KHUGEPAGED_H
 
 #include <linux/sched/coredump.h> /* MMF_VM_HUGEPAGE */
+#include <linux/shmem_fs.h>
 
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
@@ -57,6 +58,7 @@ static inline int khugepaged_enter(struct vm_area_struct *vma,
 {
        if (!test_bit(MMF_VM_HUGEPAGE, &vma->vm_mm->flags))
                if ((khugepaged_always() ||
+                    (shmem_file(vma->vm_file) && shmem_huge_enabled(vma)) ||
                     (khugepaged_req_madv() && (vm_flags & VM_HUGEPAGE))) &&
                    !(vm_flags & VM_NOHUGEPAGE) &&
                    !test_bit(MMF_DISABLE_THP, &vma->vm_mm->flags))