projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
seq/proc: modify seq_put_decimal_[u]ll to take a const char *, not char
[cascardo/linux.git]
/
mm
/
vmalloc.c
diff --git
a/mm/vmalloc.c
b/mm/vmalloc.c
index
91f44e7
..
f2481cb
100644
(file)
--- a/
mm/vmalloc.c
+++ b/
mm/vmalloc.c
@@
-1359,14
+1359,14
@@
static struct vm_struct *__get_vm_area_node(unsigned long size,
struct vm_struct *area;
BUG_ON(in_interrupt());
struct vm_struct *area;
BUG_ON(in_interrupt());
- if (flags & VM_IOREMAP)
- align = 1ul << clamp_t(int, fls_long(size),
- PAGE_SHIFT, IOREMAP_MAX_ORDER);
-
size = PAGE_ALIGN(size);
if (unlikely(!size))
return NULL;
size = PAGE_ALIGN(size);
if (unlikely(!size))
return NULL;
+ if (flags & VM_IOREMAP)
+ align = 1ul << clamp_t(int, get_count_order_long(size),
+ PAGE_SHIFT, IOREMAP_MAX_ORDER);
+
area = kzalloc_node(sizeof(*area), gfp_mask & GFP_RECLAIM_MASK, node);
if (unlikely(!area))
return NULL;
area = kzalloc_node(sizeof(*area), gfp_mask & GFP_RECLAIM_MASK, node);
if (unlikely(!area))
return NULL;
@@
-1601,7
+1601,6
@@
static void *__vmalloc_node(unsigned long size, unsigned long align,
static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
pgprot_t prot, int node)
{
static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
pgprot_t prot, int node)
{
- const int order = 0;
struct page **pages;
unsigned int nr_pages, array_size, i;
const gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO;
struct page **pages;
unsigned int nr_pages, array_size, i;
const gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO;
@@
-1629,9
+1628,9
@@
static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
struct page *page;
if (node == NUMA_NO_NODE)
struct page *page;
if (node == NUMA_NO_NODE)
- page = alloc_page
s(alloc_mask, order
);
+ page = alloc_page
(alloc_mask
);
else
else
- page = alloc_pages_node(node, alloc_mask,
order
);
+ page = alloc_pages_node(node, alloc_mask,
0
);
if (unlikely(!page)) {
/* Successfully allocated i pages, free them in __vunmap() */
if (unlikely(!page)) {
/* Successfully allocated i pages, free them in __vunmap() */
@@
-1648,8
+1647,8
@@
static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
return area->addr;
fail:
return area->addr;
fail:
- warn_alloc
_failed(gfp_mask, order
,
- "vmalloc: allocation failure, allocated %ld of %ld bytes
\n
",
+ warn_alloc
(gfp_mask
,
+ "vmalloc: allocation failure, allocated %ld of %ld bytes",
(area->nr_pages*PAGE_SIZE), area->size);
vfree(area->addr);
return NULL;
(area->nr_pages*PAGE_SIZE), area->size);
vfree(area->addr);
return NULL;
@@
-1710,9
+1709,8
@@
void *__vmalloc_node_range(unsigned long size, unsigned long align,
return addr;
fail:
return addr;
fail:
- warn_alloc_failed(gfp_mask, 0,
- "vmalloc: allocation failure: %lu bytes\n",
- real_size);
+ warn_alloc(gfp_mask,
+ "vmalloc: allocation failure: %lu bytes", real_size);
return NULL;
}
return NULL;
}