diff mbox series

[RT] mm/memcontrol: Move misplaced local_unlock_irqrestore()

Message ID 20200126211945.28116-1-matt@codeblueprint.co.uk
State New
Headers show
Series [RT] mm/memcontrol: Move misplaced local_unlock_irqrestore() | expand

Commit Message

Matt Fleming Jan. 26, 2020, 9:19 p.m. UTC
There's no need to leave interrupts disabled when calling css_put_many().

Cc: Daniel Wagner <wagi@monom.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7b6f208c5a6b..1120b9d8dd86 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -7062,10 +7062,10 @@  void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
 	mem_cgroup_charge_statistics(memcg, page, PageTransHuge(page),
 				     -nr_entries);
 	memcg_check_events(memcg, page);
+	local_unlock_irqrestore(event_lock, flags);
 
 	if (!mem_cgroup_is_root(memcg))
 		css_put_many(&memcg->css, nr_entries);
-	local_unlock_irqrestore(event_lock, flags);
 }
 
 /**