[RFC v2 23/34] mm, slub: discard slabs in unfreeze_partials() without irqs disabled

From: Vlastimil Babka
Date: Wed Jun 09 2021 - 07:40:55 EST


No need for disabled irqs when discarding slabs, so restore them before
discarding.

Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
---
mm/slub.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/slub.c b/mm/slub.c
index 4a3cd8174cd2..dcbc5baea702 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2346,6 +2346,8 @@ static void unfreeze_partials(struct kmem_cache *s,
if (n)
spin_unlock(&n->list_lock);

+ local_irq_restore(flags);
+
while (discard_page) {
page = discard_page;
discard_page = discard_page->next;
@@ -2355,7 +2357,6 @@ static void unfreeze_partials(struct kmem_cache *s,
stat(s, FREE_SLAB);
}

- local_irq_restore(flags);
#endif /* CONFIG_SLUB_CPU_PARTIAL */
}

--
2.31.1