diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/task_mmu.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 9ab97cef0daa..50bd5a8f0446 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -402,12 +402,11 @@ struct numa_maps { | |||
402 | /* | 402 | /* |
403 | * Calculate numa node maps for a vma | 403 | * Calculate numa node maps for a vma |
404 | */ | 404 | */ |
405 | static struct numa_maps *get_numa_maps(const struct vm_area_struct *vma) | 405 | static struct numa_maps *get_numa_maps(struct vm_area_struct *vma) |
406 | { | 406 | { |
407 | int i; | ||
407 | struct page *page; | 408 | struct page *page; |
408 | unsigned long vaddr; | 409 | unsigned long vaddr; |
409 | struct mm_struct *mm = vma->vm_mm; | ||
410 | int i; | ||
411 | struct numa_maps *md = kmalloc(sizeof(struct numa_maps), GFP_KERNEL); | 410 | struct numa_maps *md = kmalloc(sizeof(struct numa_maps), GFP_KERNEL); |
412 | 411 | ||
413 | if (!md) | 412 | if (!md) |
@@ -420,7 +419,7 @@ static struct numa_maps *get_numa_maps(const struct vm_area_struct *vma) | |||
420 | md->node[i] =0; | 419 | md->node[i] =0; |
421 | 420 | ||
422 | for (vaddr = vma->vm_start; vaddr < vma->vm_end; vaddr += PAGE_SIZE) { | 421 | for (vaddr = vma->vm_start; vaddr < vma->vm_end; vaddr += PAGE_SIZE) { |
423 | page = follow_page(mm, vaddr, 0); | 422 | page = follow_page(vma, vaddr, 0); |
424 | if (page) { | 423 | if (page) { |
425 | int count = page_mapcount(page); | 424 | int count = page_mapcount(page); |
426 | 425 | ||