summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-03 17:06:08 +0300
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 19:59:02 +0300
commiteed05e54d275b3cfc5d8c79843c5276a5878e94a (patch)
treeec7411a6713c845154731e0cd66a55adc501e792 /kernel
parentf087b903fc2e4975bff9742a66ee7a837a2f545b (diff)
downloadlinux-eed05e54d275b3cfc5d8c79843c5276a5878e94a.tar.xz
mm: Add DEFINE_PAGE_VMA_WALK and DEFINE_FOLIO_VMA_WALK
Instead of declaring a struct page_vma_mapped_walk directly, use these helpers to allow us to transition to a PFN approach in the following patches. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/uprobes.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index eed2f7437d96..6418083901d4 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -155,11 +155,7 @@ static int __replace_page(struct vm_area_struct *vma, unsigned long addr,
struct page *old_page, struct page *new_page)
{
struct mm_struct *mm = vma->vm_mm;
- struct page_vma_mapped_walk pvmw = {
- .page = compound_head(old_page),
- .vma = vma,
- .address = addr,
- };
+ DEFINE_FOLIO_VMA_WALK(pvmw, page_folio(old_page), vma, addr, 0);
int err;
struct mmu_notifier_range range;