Skip to content

Commit 1757bbd

Browse files
Naoya Horiguchitorvalds
authored andcommitted
arch/powerpc/mm/subpage-prot.c: use walk->vma and walk_page_vma()
We don't have to use mm_walk->private to pass vma to the callback function because of mm_walk->vma. And walk_page_vma() is useful if we walk over a single vma. Signed-off-by: Naoya Horiguchi <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 26bcd64 commit 1757bbd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

arch/powerpc/mm/subpage-prot.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void subpage_prot_clear(unsigned long addr, unsigned long len)
134134
static int subpage_walk_pmd_entry(pmd_t *pmd, unsigned long addr,
135135
unsigned long end, struct mm_walk *walk)
136136
{
137-
struct vm_area_struct *vma = walk->private;
137+
struct vm_area_struct *vma = walk->vma;
138138
split_huge_page_pmd(vma, addr, pmd);
139139
return 0;
140140
}
@@ -163,9 +163,7 @@ static void subpage_mark_vma_nohuge(struct mm_struct *mm, unsigned long addr,
163163
if (vma->vm_start >= (addr + len))
164164
break;
165165
vma->vm_flags |= VM_NOHUGEPAGE;
166-
subpage_proto_walk.private = vma;
167-
walk_page_range(vma->vm_start, vma->vm_end,
168-
&subpage_proto_walk);
166+
walk_page_vma(vma, &subpage_proto_walk);
169167
vma = vma->vm_next;
170168
}
171169
}

0 commit comments

Comments
 (0)