Skip to content

Commit b0752f1

Browse files
fancxlakpm00
authored andcommitted
mm/hugetlb: pass folio instead of page to unmap_ref_private()
Patch series "Let unmap_hugepage_range() and several related functions take folio instead of page", v4. This patch (of 4): unmap_ref_private() has only a single user, which passes in &folio->page. Let it take the folio directly. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Fan Ni <[email protected]> Reviewed-by: Muchun Song <[email protected]> Reviewed-by: Sidhartha Kumar <[email protected]> Reviewed-by: Oscar Salvador <[email protected]> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: "Vishal Moola (Oracle)" <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 200577f commit b0752f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mm/hugetlb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6071,7 +6071,7 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
60716071
* same region.
60726072
*/
60736073
static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
6074-
struct page *page, unsigned long address)
6074+
struct folio *folio, unsigned long address)
60756075
{
60766076
struct hstate *h = hstate_vma(vma);
60776077
struct vm_area_struct *iter_vma;
@@ -6115,7 +6115,8 @@ static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
61156115
*/
61166116
if (!is_vma_resv_set(iter_vma, HPAGE_RESV_OWNER))
61176117
unmap_hugepage_range(iter_vma, address,
6118-
address + huge_page_size(h), page, 0);
6118+
address + huge_page_size(h),
6119+
&folio->page, 0);
61196120
}
61206121
i_mmap_unlock_write(mapping);
61216122
}
@@ -6238,8 +6239,7 @@ static vm_fault_t hugetlb_wp(struct folio *pagecache_folio,
62386239
hugetlb_vma_unlock_read(vma);
62396240
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
62406241

6241-
unmap_ref_private(mm, vma, &old_folio->page,
6242-
vmf->address);
6242+
unmap_ref_private(mm, vma, old_folio, vmf->address);
62436243

62446244
mutex_lock(&hugetlb_fault_mutex_table[hash]);
62456245
hugetlb_vma_lock_read(vma);

0 commit comments

Comments
 (0)