aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/memcontrol.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 27981e705b0a..79a53f0f0cf5 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -840,9 +840,7 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem)
840 struct mem_cgroup *curr = NULL; 840 struct mem_cgroup *curr = NULL;
841 841
842 task_lock(task); 842 task_lock(task);
843 rcu_read_lock();
844 curr = try_get_mem_cgroup_from_mm(task->mm); 843 curr = try_get_mem_cgroup_from_mm(task->mm);
845 rcu_read_unlock();
846 task_unlock(task); 844 task_unlock(task);
847 if (!curr) 845 if (!curr)
848 return 0; 846 return 0;
@@ -2092,7 +2090,6 @@ int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,
2092 if (!(gfp_mask & __GFP_WAIT)) { 2090 if (!(gfp_mask & __GFP_WAIT)) {
2093 struct page_cgroup *pc; 2091 struct page_cgroup *pc;
2094 2092
2095
2096 pc = lookup_page_cgroup(page); 2093 pc = lookup_page_cgroup(page);
2097 if (!pc) 2094 if (!pc)
2098 return 0; 2095 return 0;
@@ -2286,7 +2283,6 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype)
2286{ 2283{
2287 struct page_cgroup *pc; 2284 struct page_cgroup *pc;
2288 struct mem_cgroup *mem = NULL; 2285 struct mem_cgroup *mem = NULL;
2289 struct mem_cgroup_per_zone *mz;
2290 2286
2291 if (mem_cgroup_disabled()) 2287 if (mem_cgroup_disabled())
2292 return NULL; 2288 return NULL;
@@ -2340,7 +2336,6 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype)
2340 * special functions. 2336 * special functions.
2341 */ 2337 */
2342 2338
2343 mz = page_cgroup_zoneinfo(pc);
2344 unlock_page_cgroup(pc); 2339 unlock_page_cgroup(pc);
2345 2340
2346 memcg_check_events(mem, page); 2341 memcg_check_events(mem, page);
@@ -2652,11 +2647,8 @@ void mem_cgroup_end_migration(struct mem_cgroup *mem,
2652 ClearPageCgroupMigration(pc); 2647 ClearPageCgroupMigration(pc);
2653 unlock_page_cgroup(pc); 2648 unlock_page_cgroup(pc);
2654 2649
2655 if (unused != oldpage)
2656 pc = lookup_page_cgroup(unused);
2657 __mem_cgroup_uncharge_common(unused, MEM_CGROUP_CHARGE_TYPE_FORCE); 2650 __mem_cgroup_uncharge_common(unused, MEM_CGROUP_CHARGE_TYPE_FORCE);
2658 2651
2659 pc = lookup_page_cgroup(used);
2660 /* 2652 /*
2661 * If a page is a file cache, radix-tree replacement is very atomic 2653 * If a page is a file cache, radix-tree replacement is very atomic
2662 * and we can skip this check. When it was an Anon page, its mapcount 2654 * and we can skip this check. When it was an Anon page, its mapcount
@@ -3800,8 +3792,6 @@ static int mem_cgroup_oom_control_read(struct cgroup *cgrp,
3800 return 0; 3792 return 0;
3801} 3793}
3802 3794
3803/*
3804 */
3805static int mem_cgroup_oom_control_write(struct cgroup *cgrp, 3795static int mem_cgroup_oom_control_write(struct cgroup *cgrp,
3806 struct cftype *cft, u64 val) 3796 struct cftype *cft, u64 val)
3807{ 3797{