]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fs/binfmt_elf: Use maple tree iterators for fill_files_note()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 4 Jan 2021 19:44:16 +0000 (14:44 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 22 Oct 2021 00:27:29 +0000 (20:27 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
fs/binfmt_elf.c

index 69d900a8473d4e39080635697796e9ec340b7b5e..76d27ff05729467433697414f65983ea7fb3736c 100644 (file)
@@ -1614,6 +1614,7 @@ static int fill_files_note(struct memelfnote *note)
        user_long_t *data;
        user_long_t *start_end_ofs;
        char *name_base, *name_curpos;
+       MA_STATE(mas, &mm->mm_mt, 0, 0);
 
        /* *Estimated* file count and total data size needed */
        count = mm->map_count;
@@ -1638,7 +1639,7 @@ static int fill_files_note(struct memelfnote *note)
        name_base = name_curpos = ((char *)data) + names_ofs;
        remaining = size - names_ofs;
        count = 0;
-       for (vma = mm->mmap; vma != NULL; vma = vma->vm_next) {
+       mas_for_each(&mas, vma, ULONG_MAX) {
                struct file *file;
                const char *filename;