diff options
| author | Johannes Weiner <hannes@cmpxchg.org> | 2014-04-07 18:37:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:35:56 -0400 |
| commit | df381975463996178d685f6ef7d3555c5f887201 (patch) | |
| tree | 22fd4f923fc2cc1ed1d7c4aa94039452ce6123e5 /include | |
| parent | 03583f1a631c0511dfd2f16e716d5b40f675de5a (diff) | |
memcg: get_mem_cgroup_from_mm()
Instead of returning NULL from try_get_mem_cgroup_from_mm() when the mm
owner is exiting, just return root_mem_cgroup. This makes sense for all
callsites and gets rid of some of them having to fallback manually.
[fengguang.wu@intel.com: fix warnings]
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/memcontrol.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index eccfb4a4b379..134636f835f7 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -94,7 +94,6 @@ bool task_in_mem_cgroup(struct task_struct *task, | |||
| 94 | 94 | ||
| 95 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); | 95 | extern struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page); |
| 96 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); | 96 | extern struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); |
| 97 | extern struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm); | ||
| 98 | 97 | ||
| 99 | extern struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg); | 98 | extern struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg); |
| 100 | extern struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *css); | 99 | extern struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *css); |
| @@ -294,11 +293,6 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_page(struct page *page) | |||
| 294 | return NULL; | 293 | return NULL; |
| 295 | } | 294 | } |
| 296 | 295 | ||
| 297 | static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) | ||
| 298 | { | ||
| 299 | return NULL; | ||
| 300 | } | ||
| 301 | |||
| 302 | static inline bool mm_match_cgroup(struct mm_struct *mm, | 296 | static inline bool mm_match_cgroup(struct mm_struct *mm, |
| 303 | struct mem_cgroup *memcg) | 297 | struct mem_cgroup *memcg) |
| 304 | { | 298 | { |
