diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 595d03f33b2c..8a79a6f0f029 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -811,12 +811,10 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem) | |||
811 | * enabled in "curr" and "curr" is a child of "mem" in *cgroup* | 811 | * enabled in "curr" and "curr" is a child of "mem" in *cgroup* |
812 | * hierarchy(even if use_hierarchy is disabled in "mem"). | 812 | * hierarchy(even if use_hierarchy is disabled in "mem"). |
813 | */ | 813 | */ |
814 | rcu_read_lock(); | ||
815 | if (mem->use_hierarchy) | 814 | if (mem->use_hierarchy) |
816 | ret = css_is_ancestor(&curr->css, &mem->css); | 815 | ret = css_is_ancestor(&curr->css, &mem->css); |
817 | else | 816 | else |
818 | ret = (curr == mem); | 817 | ret = (curr == mem); |
819 | rcu_read_unlock(); | ||
820 | css_put(&curr->css); | 818 | css_put(&curr->css); |
821 | return ret; | 819 | return ret; |
822 | } | 820 | } |
@@ -1603,7 +1601,6 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, | |||
1603 | * There is a small race that "from" or "to" can be | 1601 | * There is a small race that "from" or "to" can be |
1604 | * freed by rmdir, so we use css_tryget(). | 1602 | * freed by rmdir, so we use css_tryget(). |
1605 | */ | 1603 | */ |
1606 | rcu_read_lock(); | ||
1607 | from = mc.from; | 1604 | from = mc.from; |
1608 | to = mc.to; | 1605 | to = mc.to; |
1609 | if (from && css_tryget(&from->css)) { | 1606 | if (from && css_tryget(&from->css)) { |
@@ -1624,7 +1621,6 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, | |||
1624 | do_continue = (to == mem_over_limit); | 1621 | do_continue = (to == mem_over_limit); |
1625 | css_put(&to->css); | 1622 | css_put(&to->css); |
1626 | } | 1623 | } |
1627 | rcu_read_unlock(); | ||
1628 | if (do_continue) { | 1624 | if (do_continue) { |
1629 | DEFINE_WAIT(wait); | 1625 | DEFINE_WAIT(wait); |
1630 | prepare_to_wait(&mc.waitq, &wait, | 1626 | prepare_to_wait(&mc.waitq, &wait, |