[RFC PATCH v1 2/4] mm: also set VMA in khugepaged range invalidation

From: Mircea CIRJALIU - MELIU
Date: Wed Dec 11 2019 - 04:29:30 EST


MMU notifier client may need the VMA for extra info.
This change is needed by the remote mapping feature that inspects anon VMAs
with huge mappings.

Signed-off-by: Mircea Cirjaliu <mcirjaliu@xxxxxxxxxxxxxxx>
---
mm/khugepaged.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index b679908..11c65f3 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1028,7 +1028,7 @@ static void collapse_huge_page(struct mm_struct *mm,

anon_vma_lock_write(vma->anon_vma);

- mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm,
+ mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, mm,
address, address + HPAGE_PMD_SIZE);
mmu_notifier_invalidate_range_start(&range);