[PATCH] perf: Remove setting of page->index and ->mapping

Matthew Wilcox (Oracle)
2024-08-09T20:10:44Z

I have no idea why perf is setting these fields. There should be
no need to do this.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
kernel/events/core.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index aa3450bdc227..f55ab04f3df0 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6221,8 +6221,6 @@ static vm_fault_t perf_mmap_fault(struct vm_fault *vmf)
goto unlock;

get_page(vmf->page);
- vmf->page->mapping = vmf->vma->vm_file->f_mapping;
- vmf->page->index = vmf->pgoff;

ret = 0;
unlock:
--
2.43.0