return !cgroup_subsys_enabled(memory_cgrp_subsys);
}
-static inline unsigned long mem_cgroup_protection(struct mem_cgroup *memcg)
+static inline void mem_cgroup_protection(struct mem_cgroup *memcg,
+ unsigned long *min, unsigned long *low)
{
- if (mem_cgroup_disabled())
- return 0;
+ if (mem_cgroup_disabled()) {
+ *min = 0;
+ *low = 0;
+ return;
+ }
- return max(READ_ONCE(memcg->memory.emin), READ_ONCE(memcg->memory.elow));
+ *min = READ_ONCE(memcg->memory.emin);
+ *low = READ_ONCE(memcg->memory.elow);
}
enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root,
{
}
-static inline unsigned long mem_cgroup_protection(struct mem_cgroup *memcg)
+static inline void mem_cgroup_protection(struct mem_cgroup *memcg,
+ unsigned long *min, unsigned long *low)
{
- return 0;
+ *min = 0;
+ *low = 0;
}
static inline enum mem_cgroup_protection mem_cgroup_protected(