Skip to content

Commit

Permalink
mm, slub: discard slabs in unfreeze_partials() without irqs disabled
Browse files Browse the repository at this point in the history
No need for disabled irqs when discarding slabs, so restore them before
discarding.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
  • Loading branch information
Vlastimil Babka committed Sep 3, 2021
1 parent f3ab8b6 commit 8de06a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2406,6 +2406,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;
Expand All @@ -2415,7 +2417,6 @@ static void unfreeze_partials(struct kmem_cache *s,
stat(s, FREE_SLAB);
}

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

Expand Down

0 comments on commit 8de06a6

Please sign in to comment.