mm: thp: make transhuge_vma_suitable available for anonymous THP
[linux-2.6-microblaze.git] / mm / memory.c
index 89325f9..e2bb51b 100644 (file)
@@ -3162,19 +3162,6 @@ map_pte:
 }
 
 #ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
-
-#define HPAGE_CACHE_INDEX_MASK (HPAGE_PMD_NR - 1)
-static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
-               unsigned long haddr)
-{
-       if (((vma->vm_start >> PAGE_SHIFT) & HPAGE_CACHE_INDEX_MASK) !=
-                       (vma->vm_pgoff & HPAGE_CACHE_INDEX_MASK))
-               return false;
-       if (haddr < vma->vm_start || haddr + HPAGE_PMD_SIZE > vma->vm_end)
-               return false;
-       return true;
-}
-
 static void deposit_prealloc_pte(struct vm_fault *vmf)
 {
        struct vm_area_struct *vma = vmf->vma;