diff options
-rw-r--r-- | mm/memcontrol.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4f5f93657246..7acf43bf04a2 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -412,10 +412,14 @@ struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *s) | |||
412 | return container_of(s, struct mem_cgroup, css); | 412 | return container_of(s, struct mem_cgroup, css); |
413 | } | 413 | } |
414 | 414 | ||
415 | static inline bool mem_cgroup_is_root(struct mem_cgroup *memcg) | ||
416 | { | ||
417 | return (memcg == root_mem_cgroup); | ||
418 | } | ||
419 | |||
415 | /* Writing them here to avoid exposing memcg's inner layout */ | 420 | /* Writing them here to avoid exposing memcg's inner layout */ |
416 | #if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM) | 421 | #if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM) |
417 | 422 | ||
418 | static bool mem_cgroup_is_root(struct mem_cgroup *memcg); | ||
419 | void sock_update_memcg(struct sock *sk) | 423 | void sock_update_memcg(struct sock *sk) |
420 | { | 424 | { |
421 | if (mem_cgroup_sockets_enabled) { | 425 | if (mem_cgroup_sockets_enabled) { |
@@ -1011,11 +1015,6 @@ void mem_cgroup_iter_break(struct mem_cgroup *root, | |||
1011 | iter != NULL; \ | 1015 | iter != NULL; \ |
1012 | iter = mem_cgroup_iter(NULL, iter, NULL)) | 1016 | iter = mem_cgroup_iter(NULL, iter, NULL)) |
1013 | 1017 | ||
1014 | static inline bool mem_cgroup_is_root(struct mem_cgroup *memcg) | ||
1015 | { | ||
1016 | return (memcg == root_mem_cgroup); | ||
1017 | } | ||
1018 | |||
1019 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) | 1018 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) |
1020 | { | 1019 | { |
1021 | struct mem_cgroup *memcg; | 1020 | struct mem_cgroup *memcg; |