Skip to contentSkip to conversation

mm/hugetlb: drop unused mm parameter from unmap_ref_private()

PATCH In review Enze Li 4 participants 5 messages Oct 21 – Oct 22 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Enze Li

author
#0 lore raw

PATCH 1/1 mm/hugetlb: drop unused mm parameter from unmap_ref_private()

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.

---
 mm/hugetlb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
mm/hugetlb.c +3 -3
index b37d7d0db7fc..394c306e6d96 100644
@@ -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

Signature · 1 line
2.56.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · 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.

Thanks.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Enze Li
Quoted 6 lines · 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.

Quite interesting that this has been sitting around for so long.

A message that is not in the archive (sent off-list or not yet received): atjO4rhSYGJjaWCC@gourry-fedora-PF4VCD3F

author
#4 lore raw

Thank you, Gregory!

I noticed this was sent off-list, so looping the list back in for record.

Thanks,
Enze

Quoted 9 lines · Gregory Price
Quoted 6 lines · 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.

Reviewed-by
#5 lore raw
Quoted 19 lines · Enze Li

Thank you, Gregory!

I noticed this was sent off-list, so looping the list back in for record.

Thanks,
Enze

Quoted 9 lines · Gregory Price
Quoted 6 lines · 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.

Yes sorry, I was working on tooling last night and hit the wrong macros apparently.