diff mbox series

[v2,48/70] kernel/events/core: Use maple tree iterators instead of linked list

Message ID 20210112161240.2024684-49-Liam.Howlett@Oracle.com (mailing list archive)
State New, archived
Headers show
Series RFC mm: Introducing the Maple Tree | expand

Commit Message

Liam R. Howlett Jan. 12, 2021, 4:12 p.m. UTC
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
---
 kernel/events/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/events/core.c b/kernel/events/core.c
index dc568ca295bdc..767bec30c395f 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9888,8 +9888,9 @@  static void perf_addr_filter_apply(struct perf_addr_filter *filter,
 				   struct perf_addr_filter_range *fr)
 {
 	struct vm_area_struct *vma;
+	MA_STATE(mas, &mm->mm_mt, 0, 0);
 
-	for (vma = mm->mmap; vma; vma = vma->vm_next) {
+	mas_for_each(&mas, vma, ULONG_MAX) {
 		if (!vma->vm_file)
 			continue;