aboutsummaryrefslogtreecommitdiffstats
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-03 09:06:08 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 12:59:02 -0400
commiteed05e54d275b3cfc5d8c79843c5276a5878e94a (patch)
treeec7411a6713c845154731e0cd66a55adc501e792 /mm/ksm.c
parentmm: Add folio_pgoff() (diff)
downloadlinux-dev-eed05e54d275b3cfc5d8c79843c5276a5878e94a.tar.xz
linux-dev-eed05e54d275b3cfc5d8c79843c5276a5878e94a.zip
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 'mm/ksm.c')
-rw-r--r--mm/ksm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/ksm.c b/mm/ksm.c
index c5a4403b5dc9..ea82fef93a31 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1034,10 +1034,7 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page,
pte_t *orig_pte)
{
struct mm_struct *mm = vma->vm_mm;
- struct page_vma_mapped_walk pvmw = {
- .page = page,
- .vma = vma,
- };
+ DEFINE_PAGE_VMA_WALK(pvmw, page, vma, 0, 0);
int swapped;
int err = -EFAULT;
struct mmu_notifier_range range;