diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2014-04-08 00:37:42 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 01:35:56 +0200 |
commit | 03583f1a631c0511dfd2f16e716d5b40f675de5a (patch) | |
tree | 0fb831a01eb2931f73081d90f6a9951a017e06a4 | |
parent | mm: memcg: push !mm handling out to page cache charge function (diff) | |
download | linux-03583f1a631c0511dfd2f16e716d5b40f675de5a.tar.xz linux-03583f1a631c0511dfd2f16e716d5b40f675de5a.zip |
memcg: remove unnecessary !mm check from try_get_mem_cgroup_from_mm()
Users pass either a mm that has been established under task lock, or use
a verified current->mm, which means the task can't be exiting.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
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>
-rw-r--r-- | mm/memcontrol.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 8d6cedd16f8d..c3b674f9774f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1075,13 +1075,6 @@ struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) { struct mem_cgroup *memcg = NULL; - if (!mm) - return NULL; - /* - * Because we have no locks, mm->owner's may be being moved to other - * cgroup. We use css_tryget() here even if this looks - * pessimistic (rather than adding locks here). - */ rcu_read_lock(); do { memcg = mem_cgroup_from_task(rcu_dereference(mm->owner)); |