aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index dff33797bef4..e5f611db3da0 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1258,13 +1258,15 @@ void mem_cgroup_update_file_mapped(struct page *page, int val)
1258 goto done; 1258 goto done;
1259 1259
1260 /* 1260 /*
1261 * Preemption is already disabled, we don't need get_cpu() 1261 * Preemption is already disabled, we don't need get_cpu(),
1262 * but that's not true for RT !
1262 */ 1263 */
1263 cpu = smp_processor_id(); 1264 cpu = get_cpu();
1264 stat = &mem->stat; 1265 stat = &mem->stat;
1265 cpustat = &stat->cpustat[cpu]; 1266 cpustat = &stat->cpustat[cpu];
1266 1267
1267 __mem_cgroup_stat_add_safe(cpustat, MEM_CGROUP_STAT_FILE_MAPPED, val); 1268 __mem_cgroup_stat_add_safe(cpustat, MEM_CGROUP_STAT_FILE_MAPPED, val);
1269 put_cpu();
1268done: 1270done:
1269 unlock_page_cgroup(pc); 1271 unlock_page_cgroup(pc);
1270} 1272}