author: Vlastimil Babka <vbabka@suse.cz> 2021-05-10 16:30:01 +0200
committer: Vlastimil Babka <vbabka@suse.cz> 2021-09-04 01:12:21 +0200
commit: 6c1dbb674c5cf76d23381160577d34bead60b76b
parent: fa417ab7506f9234100e249938d13e94a8c404e8
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 6 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 4d1f3e4a5951..7798ba1c614f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1809,9 +1809,6 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
flags &= gfp_allowed_mask;
- if (gfpflags_allow_blocking(flags))
- local_irq_enable();
-
flags |= s->allocflags;
/*
@@ -1870,8 +1867,6 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
page->frozen = 1;
out:
- if (gfpflags_allow_blocking(flags))
- local_irq_disable();
if (!page)
return NULL;
@@ -2812,16 +2807,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);