• Andrew Morton's avatar
    [PATCH] From: David Gibson <david@gibson.dropbear.id.au> · 49c18faa
    Andrew Morton authored
    hugepage_vma() is both misleadingly named and unnecessary.  On most archs it
    always returns NULL, and on IA64 the vma it returns is never used.  The
    function's real purpose is to determine whether the address it is passed is a
    special hugepage address which must be looked up in hugepage pagetables,
    rather than being looked up in the normal pagetables (which might have
    specially marked hugepage PMDs or PTEs).
    
    This patch kills off hugepage_vma() and folds the logic it really needs into
    follow_huge_addr().  That now returns a (page *) if called on a special
    hugepage address, and an error encoded with ERR_PTR otherwise.  This also
    requires tweaking the IA64 code to check that the hugepage PTE is present in
    follow_huge_addr() - previously this was guaranteed, since it was only called
    if the address was in an existing hugepage VMA, and hugepages are always
    prefaulted.
    49c18faa
hugetlbpage.c 18.2 KB