summaryrefslogtreecommitdiff
path: root/tools/testing/vma/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/vma/shared.c')
-rw-r--r--tools/testing/vma/shared.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/vma/shared.c b/tools/testing/vma/shared.c
index bea9ea6db02a..4a39c9d50489 100644
--- a/tools/testing/vma/shared.c
+++ b/tools/testing/vma/shared.c
@@ -23,7 +23,8 @@ struct vm_area_struct *alloc_vma(struct mm_struct *mm,
vma->vm_start = start;
vma->vm_end = end;
- vma->vm_pgoff = pgoff;
+ vma_set_pgoff(vma, pgoff);
+ vma_set_anon_pgoff(vma, start >> PAGE_SHIFT);
vma->flags = vma_flags;
vma_assert_detached(vma);