aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memcontrol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r--include/linux/memcontrol.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 3e3318ddfc0e..27251ed428f7 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -213,6 +213,9 @@ struct mem_cgroup {
213 /* OOM-Killer disable */ 213 /* OOM-Killer disable */
214 int oom_kill_disable; 214 int oom_kill_disable;
215 215
216 /* handle for "memory.events" */
217 struct cgroup_file events_file;
218
216 /* protect arrays of thresholds */ 219 /* protect arrays of thresholds */
217 struct mutex thresholds_lock; 220 struct mutex thresholds_lock;
218 221
@@ -285,6 +288,7 @@ static inline void mem_cgroup_events(struct mem_cgroup *memcg,
285 unsigned int nr) 288 unsigned int nr)
286{ 289{
287 this_cpu_add(memcg->stat->events[idx], nr); 290 this_cpu_add(memcg->stat->events[idx], nr);
291 cgroup_file_notify(&memcg->events_file);
288} 292}
289 293
290bool mem_cgroup_low(struct mem_cgroup *root, struct mem_cgroup *memcg); 294bool mem_cgroup_low(struct mem_cgroup *root, struct mem_cgroup *memcg);
@@ -346,9 +350,7 @@ ino_t page_cgroup_ino(struct page *page);
346 350
347static inline bool mem_cgroup_disabled(void) 351static inline bool mem_cgroup_disabled(void)
348{ 352{
349 if (memory_cgrp_subsys.disabled) 353 return !cgroup_subsys_enabled(memory_cgrp_subsys);
350 return true;
351 return false;
352} 354}
353 355
354/* 356/*