diff options
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 49abccf29a29..a5bbdd3b5d67 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <linux/compiler.h> | 30 | #include <linux/compiler.h> |
31 | #include <linux/llist.h> | 31 | #include <linux/llist.h> |
32 | #include <linux/bitops.h> | ||
32 | 33 | ||
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
34 | #include <asm/tlbflush.h> | 35 | #include <asm/tlbflush.h> |
@@ -74,6 +75,8 @@ static void vunmap_pmd_range(pud_t *pud, unsigned long addr, unsigned long end) | |||
74 | pmd = pmd_offset(pud, addr); | 75 | pmd = pmd_offset(pud, addr); |
75 | do { | 76 | do { |
76 | next = pmd_addr_end(addr, end); | 77 | next = pmd_addr_end(addr, end); |
78 | if (pmd_clear_huge(pmd)) | ||
79 | continue; | ||
77 | if (pmd_none_or_clear_bad(pmd)) | 80 | if (pmd_none_or_clear_bad(pmd)) |
78 | continue; | 81 | continue; |
79 | vunmap_pte_range(pmd, addr, next); | 82 | vunmap_pte_range(pmd, addr, next); |
@@ -88,6 +91,8 @@ static void vunmap_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end) | |||
88 | pud = pud_offset(pgd, addr); | 91 | pud = pud_offset(pgd, addr); |
89 | do { | 92 | do { |
90 | next = pud_addr_end(addr, end); | 93 | next = pud_addr_end(addr, end); |
94 | if (pud_clear_huge(pud)) | ||
95 | continue; | ||
91 | if (pud_none_or_clear_bad(pud)) | 96 | if (pud_none_or_clear_bad(pud)) |
92 | continue; | 97 | continue; |
93 | vunmap_pmd_range(pud, addr, next); | 98 | vunmap_pmd_range(pud, addr, next); |
@@ -1314,7 +1319,8 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, | |||
1314 | 1319 | ||
1315 | BUG_ON(in_interrupt()); | 1320 | BUG_ON(in_interrupt()); |
1316 | if (flags & VM_IOREMAP) | 1321 | if (flags & VM_IOREMAP) |
1317 | align = 1ul << clamp(fls(size), PAGE_SHIFT, IOREMAP_MAX_ORDER); | 1322 | align = 1ul << clamp_t(int, fls_long(size), |
1323 | PAGE_SHIFT, IOREMAP_MAX_ORDER); | ||
1318 | 1324 | ||
1319 | size = PAGE_ALIGN(size); | 1325 | size = PAGE_ALIGN(size); |
1320 | if (unlikely(!size)) | 1326 | if (unlikely(!size)) |