|
@@ -1350,11 +1350,12 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
|
|
page = alloc_slab_page(alloc_gfp, node, oo);
|
|
page = alloc_slab_page(alloc_gfp, node, oo);
|
|
if (unlikely(!page)) {
|
|
if (unlikely(!page)) {
|
|
oo = s->min;
|
|
oo = s->min;
|
|
|
|
+ alloc_gfp = flags;
|
|
/*
|
|
/*
|
|
* Allocation may have failed due to fragmentation.
|
|
* Allocation may have failed due to fragmentation.
|
|
* Try a lower order alloc if possible
|
|
* Try a lower order alloc if possible
|
|
*/
|
|
*/
|
|
- page = alloc_slab_page(flags, node, oo);
|
|
|
|
|
|
+ page = alloc_slab_page(alloc_gfp, node, oo);
|
|
|
|
|
|
if (page)
|
|
if (page)
|
|
stat(s, ORDER_FALLBACK);
|
|
stat(s, ORDER_FALLBACK);
|
|
@@ -1364,7 +1365,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
|
|
&& !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) {
|
|
&& !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) {
|
|
int pages = 1 << oo_order(oo);
|
|
int pages = 1 << oo_order(oo);
|
|
|
|
|
|
- kmemcheck_alloc_shadow(page, oo_order(oo), flags, node);
|
|
|
|
|
|
+ kmemcheck_alloc_shadow(page, oo_order(oo), alloc_gfp, node);
|
|
|
|
|
|
/*
|
|
/*
|
|
* Objects from caches that have a constructor don't get
|
|
* Objects from caches that have a constructor don't get
|