]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/damon: Stop using vma_mas_store() for maple tree store
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 13 Dec 2022 20:24:45 +0000 (15:24 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 13 Dec 2022 21:03:33 +0000 (16:03 -0500)
Prepare for the removal of the vma_mas_store() function by open coding
the maple tree store in this test code.  Set the range of the maple
state and call the store function directly.

Cc: SeongJae Park <sj@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
mm/damon/vaddr-test.h

index bce37c4875402d439895430cc4b35b1b75778f89..41532f7355d0d9124e4f20737860b5d4982d366a 100644 (file)
@@ -24,8 +24,10 @@ static void __link_vmas(struct maple_tree *mt, struct vm_area_struct *vmas,
                return;
 
        mas_lock(&mas);
-       for (i = 0; i < nr_vmas; i++)
-               vma_mas_store(&vmas[i], &mas);
+       for (i = 0; i < nr_vmas; i++) {
+               mas_set_range(&mas, vmas[i].vm_start, vmas[i].vm_end - 1);
+               mas_store_gfp(&mas, &vmas[i], GFP_KERNEL);
+       }
        mas_unlock(&mas);
 }