@@ -1795,9 +1795,6 @@ static struct page *allocate_slab(struct
flags &= gfp_allowed_mask;
- if (gfpflags_allow_blocking(flags))
- local_irq_enable();
-
flags |= s->allocflags;
/*
@@ -1856,8 +1853,6 @@ static struct page *allocate_slab(struct
page->frozen = 1;
out:
- if (gfpflags_allow_blocking(flags))
- local_irq_disable();
if (!page)
return NULL;
@@ -2798,16 +2793,17 @@ new_objects:
goto check_new_page;
}
+ local_irq_restore(flags);
put_cpu_ptr(s->cpu_slab);
page = new_slab(s, gfpflags, node);
c = get_cpu_ptr(s->cpu_slab);
if (unlikely(!page)) {
- local_irq_restore(flags);
slab_out_of_memory(s, gfpflags, node);
return NULL;
}
+ local_irq_save(flags);
if (c->page)
flush_slab(s, c);