• A
    mm: move is_vma_temporary_stack() declaration to huge_mm.h · 20995974
    Alex Shi 提交于
    When transparent_hugepage_enabled() is used outside mm/, such as in
    arch/x86/xx/tlb.c:
    
    +       if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB
    +                       || transparent_hugepage_enabled(vma)) {
    +               flush_tlb_mm(vma->vm_mm);
    
    is_vma_temporary_stack() isn't referenced in huge_mm.h, so it has compile
    errors:
    
      arch/x86/mm/tlb.c: In function `flush_tlb_range':
      arch/x86/mm/tlb.c:324:4: error: implicit declaration of function `is_vma_temporary_stack' [-Werror=implicit-function-declaration]
    
    Since is_vma_temporay_stack() is just used in rmap.c and huge_memory.c, it
    is better to move it to huge_mm.h from rmap.h to avoid such errors.
    Signed-off-by: NAlex Shi <alex.shi@intel.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    20995974
huge_mm.h 6.4 KB