diff options
| -rw-r--r-- | mm/pagewalk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 8b1a2ce21ee5..38cc58b8b2b0 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c | |||
| @@ -139,7 +139,6 @@ int walk_page_range(unsigned long addr, unsigned long end, | |||
| 139 | pgd_t *pgd; | 139 | pgd_t *pgd; |
| 140 | unsigned long next; | 140 | unsigned long next; |
| 141 | int err = 0; | 141 | int err = 0; |
| 142 | struct vm_area_struct *vma; | ||
| 143 | 142 | ||
| 144 | if (addr >= end) | 143 | if (addr >= end) |
| 145 | return err; | 144 | return err; |
| @@ -149,15 +148,17 @@ int walk_page_range(unsigned long addr, unsigned long end, | |||
| 149 | 148 | ||
| 150 | pgd = pgd_offset(walk->mm, addr); | 149 | pgd = pgd_offset(walk->mm, addr); |
| 151 | do { | 150 | do { |
| 151 | struct vm_area_struct *uninitialized_var(vma); | ||
| 152 | |||
| 152 | next = pgd_addr_end(addr, end); | 153 | next = pgd_addr_end(addr, end); |
| 153 | 154 | ||
| 155 | #ifdef CONFIG_HUGETLB_PAGE | ||
| 154 | /* | 156 | /* |
| 155 | * handle hugetlb vma individually because pagetable walk for | 157 | * handle hugetlb vma individually because pagetable walk for |
| 156 | * the hugetlb page is dependent on the architecture and | 158 | * the hugetlb page is dependent on the architecture and |
| 157 | * we can't handled it in the same manner as non-huge pages. | 159 | * we can't handled it in the same manner as non-huge pages. |
| 158 | */ | 160 | */ |
| 159 | vma = find_vma(walk->mm, addr); | 161 | vma = find_vma(walk->mm, addr); |
| 160 | #ifdef CONFIG_HUGETLB_PAGE | ||
| 161 | if (vma && is_vm_hugetlb_page(vma)) { | 162 | if (vma && is_vm_hugetlb_page(vma)) { |
| 162 | if (vma->vm_end < next) | 163 | if (vma->vm_end < next) |
| 163 | next = vma->vm_end; | 164 | next = vma->vm_end; |
