|
@@ -5965,7 +5965,13 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
|
|
|
if (!mem_cgroup_is_root(memcg))
|
|
|
page_counter_uncharge(&memcg->memory, 1);
|
|
|
|
|
|
- /* Caller disabled preemption with mapping->tree_lock */
|
|
|
+ /*
|
|
|
+ * Interrupts should be disabled here because the caller holds the
|
|
|
+ * mapping->tree_lock lock which is taken with interrupts-off. It is
|
|
|
+ * important here to have the interrupts disabled because it is the
|
|
|
+ * only synchronisation we have for udpating the per-CPU variables.
|
|
|
+ */
|
|
|
+ VM_BUG_ON(!irqs_disabled());
|
|
|
mem_cgroup_charge_statistics(memcg, page, -1);
|
|
|
memcg_check_events(memcg, page);
|
|
|
}
|