Skip to contentSkip to conversation

mm: cleanup vma_iter_bulk_alloc

PATCH Applied Wentao Guan 2 participants 2 messages Nov 6, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mm: cleanup vma_iter_bulk_alloc

commit d24062914837 ("fork: use __mt_dup() to duplicate maple tree in dup_mmap()"), remove the only user and mas_expected_entries has been removed,
since commit e3852a1213ffc ("maple_tree: Drop bulk insert support"). Also cleanup the mas_expected_entries in maple_tree.h.

No functional change.

---
v2 changelog:
also remove mas_expected_entries from include/maple_tree.h.
---

---
 include/linux/maple_tree.h | 1 -
 mm/vma.h                   | 6 ------
 2 files changed, 7 deletions(-)
include/linux/maple_tree.h +0 -1
index 66f98a3da8d8b..f7ba53f3f9035 100644
@@ -536,7 +536,6 @@ bool mas_nomem(struct ma_state *mas, gfp_t gfp);
 void mas_pause(struct ma_state *mas);
 void maple_tree_init(void);
 void mas_destroy(struct ma_state *mas);
-int mas_expected_entries(struct ma_state *mas, unsigned long nr_entries);
 
 void *mas_prev(struct ma_state *mas, unsigned long min);
 void *mas_prev_range(struct ma_state *mas, unsigned long max);
mm/vma.h +0 -6
index 9183fe5490090..4aa72c7e94400 100644
@@ -498,12 +498,6 @@ static inline unsigned long vma_iter_end(struct vma_iterator *vmi)
 	return vmi->mas.last + 1;
 }
 
-static inline int vma_iter_bulk_alloc(struct vma_iterator *vmi,
-				      unsigned long count)
-{
-	return mas_expected_entries(&vmi->mas, count);
-}
-
 static inline
 struct vm_area_struct *vma_iter_prev_range(struct vma_iterator *vmi)
 {

base-commit: dc77806cf3b4788d328fddf245e86c5b529f31a2

Signature · 1 line
2.20.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Wentao Guan

commit d24062914837 ("fork: use __mt_dup() to duplicate maple tree in dup_mmap()"), remove the only user and mas_expected_entries has been removed,
since commit e3852a1213ffc ("maple_tree: Drop bulk insert support"). Also cleanup the mas_expected_entries in maple_tree.h.

No functional change.

Thanks!

Quoted 44 lines

---
v2 changelog:
also remove mas_expected_entries from include/maple_tree.h.
---

---
 include/linux/maple_tree.h | 1 -
 mm/vma.h                   | 6 ------
 2 files changed, 7 deletions(-)
include/linux/maple_tree.h +0 -1
index 66f98a3da8d8b..f7ba53f3f9035 100644
@@ -536,7 +536,6 @@ bool mas_nomem(struct ma_state *mas, gfp_t gfp);
 void mas_pause(struct ma_state *mas);
 void maple_tree_init(void);
 void mas_destroy(struct ma_state *mas);
-int mas_expected_entries(struct ma_state *mas, unsigned long nr_entries);
 
 void *mas_prev(struct ma_state *mas, unsigned long min);
 void *mas_prev_range(struct ma_state *mas, unsigned long max);
mm/vma.h +0 -6
index 9183fe5490090..4aa72c7e94400 100644
@@ -498,12 +498,6 @@ static inline unsigned long vma_iter_end(struct vma_iterator *vmi)
 	return vmi->mas.last + 1;
 }
 
-static inline int vma_iter_bulk_alloc(struct vma_iterator *vmi,
-				      unsigned long count)
-{
-	return mas_expected_entries(&vmi->mas, count);
-}
-
 static inline
 struct vm_area_struct *vma_iter_prev_range(struct vma_iterator *vmi)
 {

base-commit: dc77806cf3b4788d328fddf245e86c5b529f31a2

Signature · 1 line
2.20.1