Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/hugetlb: drop unused mm parameter from unmap_ref_private()
@ 2026-10-21  6:19 Enze Li
  2026-10-21  6:21 ` Muchun Song
  2026-10-21 14:18 ` Vishal Moola (Fractile)
  0 siblings, 2 replies; 3+ messages in thread
From: Enze Li @ 2026-10-21  6:19 UTC (permalink / raw)
  To: muchun.song, osalvador, david, akpm; +Cc: linux-mm, Enze Li

The mm parameter has never been used since the helper was introduced in
commit 04f2cbe35699 ("hugetlb: guarantee that COW faults for a process that
called mmap(MAP_PRIVATE) on hugetlbfs will succeed").  Remove it and drop
it at the sole call site.

Signed-off-by: Enze Li <lienze@kylinos.cn>
---
 mm/hugetlb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index b37d7d0db7fc..394c306e6d96 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5504,8 +5504,8 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
  * from other VMAs and let the children be SIGKILLed if they are faulting the
  * same region.
  */
-static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
-			      struct folio *folio, unsigned long address)
+static void unmap_ref_private(struct vm_area_struct *vma, struct folio *folio,
+			      unsigned long address)
 {
 	struct hstate *h = hstate_vma(vma);
 	struct vm_area_struct *iter_vma;
@@ -5681,7 +5681,7 @@ static vm_fault_t hugetlb_wp(struct vm_fault *vmf)
 			hugetlb_vma_unlock_read(vma);
 			mutex_unlock(&hugetlb_fault_mutex_table[hash]);
 
-			unmap_ref_private(mm, vma, old_folio, vmf->address);
+			unmap_ref_private(vma, old_folio, vmf->address);
 
 			mutex_lock(&hugetlb_fault_mutex_table[hash]);
 			hugetlb_vma_lock_read(vma);

base-commit: adccb2dfbbc10fab73d6f1b8724c003ef9e65773
-- 
2.56.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-21 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21  6:19 [PATCH] mm/hugetlb: drop unused mm parameter from unmap_ref_private() Enze Li
2026-10-21  6:21 ` Muchun Song
2026-10-21 14:18 ` Vishal Moola (Fractile)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox