This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / i386 / mm / hugetlbpage.c
index a0eab67..a67a9be 100644 (file)
@@ -148,6 +148,9 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
        struct page *page;
        struct vm_area_struct *vma;
 
+       if (! mm->used_hugetlb)
+               return ERR_PTR(-EINVAL);
+
        vma = find_vma(mm, addr);
        if (!vma || !is_vm_hugetlb_page(vma))
                return ERR_PTR(-EINVAL);