mm/hugetlb: Drop __unmap_hugepage_range definition from hugetlb.h
Subsystems (2)
PATCH v2 1/1 mm/hugetlb: Drop __unmap_hugepage_range definition from hugetlb.h
Remove __unmap_hugepage_range() from the header file, because it is only used in hugetlb.c.
Suggested-by Mike Kravetz <[email protected]>
Reviewed-by Mike Kravetz <[email protected]>
Reviewed-by John Hubbard <[email protected]>
Reviewed-by Muchun Song <[email protected]>
Signed-off-by Peter Xu <[email protected]>
--- include/linux/hugetlb.h | 10 ---------- mm/hugetlb.c | 6 +++--- 2 files changed, 3 insertions(+), 13 deletions(-)
include/linux/hugetlb.h +0 -10
@@ -143,9 +143,6 @@ void __unmap_hugepage_range_final(struct mmu_gather *tlb,struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page); -void __unmap_hugepage_range (struct mmu_gather *tlb,struct vm_area_struct *vma, -unsigned long start,unsigned long end, -struct page *ref_page);void hugetlb_report_meminfo (struct seq_file *);int hugetlb_report_node_meminfo (char *buf,int len,int nid);void hugetlb_show_meminfo (void );
@@ -385,13 +382,6 @@ static inline void __unmap_hugepage_range_final(struct mmu_gather *tlb,BUG (); } -static inline void __unmap_hugepage_range (struct mmu_gather *tlb, -struct vm_area_struct *vma,unsigned long start, -unsigned long end,struct page *ref_page) -{ -BUG (); -} -static inline vm_fault_t hugetlb_fault (struct mm_struct *mm,struct vm_area_struct *vma,unsigned long address,unsigned int flags)
mm/hugetlb.c +3 -3
@@ -4426,9 +4426,9 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,return ret; } -void __unmap_hugepage_range (struct mmu_gather *tlb,struct vm_area_struct *vma, -unsigned long start,unsigned long end, -struct page *ref_page) +static void __unmap_hugepage_range (struct mmu_gather *tlb,struct vm_area_struct *vma, +unsigned long start,unsigned long end, +struct page *ref_page) {struct mm_struct *mm = vma->vm_mm;unsigned long address;
Signature · 1 line
2.31.1
Quoted 49 lines · Peter Xu
Remove
__unmap_hugepage_range()from the header file, because it is only used inhugetlb.c.Suggested-by Mike Kravetz <[email protected]>Reviewed-by Mike Kravetz <[email protected]>Reviewed-by John Hubbard <[email protected]>Reviewed-by Muchun Song <[email protected]>Signed-off-by Peter Xu <[email protected]>--- include/linux/hugetlb.h | 10 ---------- mm/hugetlb.c | 6 +++--- 2 files changed, 3 insertions(+), 13 deletions(-)include/linux/hugetlb.h +0
-10@@ -143,9 +143,6 @@ void __unmap_hugepage_range_final(struct mmu_gather *tlb,struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page); -void __unmap_hugepage_range (struct mmu_gather *tlb,struct vm_area_struct *vma, -unsigned long start,unsigned long end, -struct page *ref_page);void hugetlb_report_meminfo (struct seq_file *);int hugetlb_report_node_meminfo (char *buf,int len,int nid);void hugetlb_show_meminfo (void );@@ -385,13 +382,6 @@ static inline void __unmap_hugepage_range_final(struct mmu_gather *tlb,BUG (); } -static inline void __unmap_hugepage_range (struct mmu_gather *tlb, -struct vm_area_struct *vma,unsigned long start, -unsigned long end,struct page *ref_page) -{ -BUG (); -} -static inline vm_fault_t hugetlb_fault (struct mm_struct *mm,struct vm_area_struct *vma,unsigned long address,unsigned int flags)mm/hugetlb.c +0
-0@@ -4426,9 +4426,9 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,return ret; }
mm/hugetlb.c int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, · line 4434
Quoted 10 lines
mm/hugetlb.c +3
-3-void __unmap_hugepage_range (struct mmu_gather *tlb,struct vm_area_struct *vma, -unsigned long start,unsigned long end, -struct page *ref_page) +static void __unmap_hugepage_range (struct mmu_gather *tlb,struct vm_area_struct *vma, +unsigned long start,unsigned long end, +struct page *ref_page) {struct mm_struct *mm = vma->vm_mm;unsigned long address;
Reviewed-by David Hildenbrand <[email protected]>
Signature · 3 lines
Thanks, David / dhildenb