fixups for memcg cgroup_lock conversion
Subsystems (3)
cover fixups for memcg cgroup_lock conversion
Andrew,
Please consider applying the following fixups to two of the patches in my latest cgroup_lock conversion series. Apparently, there were some mistake while converting one of the functions, mem_cgroup_oom_control_write. Smatch found this one due in kbuild to the lock imbalance when exiting the function.
Names should be already in your fixup format.
Glauber Costa (2):
memcg: fast hierarchy-aware child test fix
memcg: replace cgroup_lock with memcg specific memcg_lock fix
mm/memcontrol.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 7 lines
1.8.1.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/2 memcg: fast hierarchy-aware child test fix
--- mm/memcontrol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/memcontrol.c +1 -2
@@ -5883,8 +5883,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,mutex_lock (&memcg_create_mutex);/* oom-kill-disable is a flag for subhierarchy. */ -if ((parent->use_hierarchy) || - (memcg->use_hierarchy && !list_empty (&cgrp->children))) { +if ((parent->use_hierarchy) ||memcg_has_children (memcg)) {cgroup_unlock ();return -EINVAL ; }
Signature · 7 lines
1.8.1.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 1/2] memcg: fast hierarchy-aware child test fix
Quoted 26 lines · Glauber Costa
--- mm/memcontrol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)mm/memcontrol.c +1
-2@@ -5883,8 +5883,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,mutex_lock (&memcg_create_mutex);/* oom-kill-disable is a flag for subhierarchy. */ -if ((parent->use_hierarchy) || - (memcg->use_hierarchy && !list_empty (&cgrp->children))) { +if ((parent->use_hierarchy) ||memcg_has_children (memcg)) {cgroup_unlock ();return -EINVAL ; }Signature · 7 lines
1.8.1.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 1/2] memcg: fast hierarchy-aware child test fix
In reply to Glauber CostaQuoted 10 lines · Glauber Costa
--- mm/memcontrol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)mm/memcontrol.c +0
-0
mm/memcontrol.c static int mem_cgroup_oom_control_write(struct cgroup *cgrp, · line 5889
Quoted 9 lines
mm/memcontrol.c +1
-2@@ -5883,8 +5883,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,mutex_lock (&memcg_create_mutex);/* oom-kill-disable is a flag for subhierarchy. */ -if ((parent->use_hierarchy) || - (memcg->use_hierarchy && !list_empty (&cgrp->children))) { +if ((parent->use_hierarchy) ||memcg_has_children (memcg)) {cgroup_unlock ();return -EINVAL ; }
PATCH 2/2 memcg: replace cgroup_lock with memcg specific memcg_lock fix
In reply to Glauber Costa--- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +1 -1
@@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,mutex_lock (&memcg_create_mutex);/* oom-kill-disable is a flag for subhierarchy. */ if ((parent->use_hierarchy) ||memcg_has_children (memcg)) { -cgroup_unlock (); +mutex_unlock (&memcg_create_mutex);return -EINVAL ; } memcg->oom_kill_disable = val;
Signature · 7 lines
1.8.1.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Re: [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
Ouch, I have totally missed this one.
Quoted 26 lines · Glauber Costa
Signed-off-by Glauber Costa <[email protected]>Reported-by Dan Carpenter <[email protected]>--- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/memcontrol.c +1
-1@@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,mutex_lock (&memcg_create_mutex);/* oom-kill-disable is a flag for subhierarchy. */ if ((parent->use_hierarchy) ||memcg_has_children (memcg)) { -cgroup_unlock (); +mutex_unlock (&memcg_create_mutex);return -EINVAL ; } memcg->oom_kill_disable = val;Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Michal Hocko SUSE Labs
Re: [PATCH 2/2] memcg: replace cgroup_lock with memcg specific memcg_lock fix
In reply to Glauber CostaQuoted 2 lines · Glauber Costa
Signed-off-by Glauber Costa <[email protected]>Reported-by Dan Carpenter <[email protected]>
I'm sorry I missed this...
Quoted 18 lines
--- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/memcontrol.c +1
-1@@ -5884,7 +5884,7 @@ static int mem_cgroup_oom_control_write(struct cgroup *cgrp,mutex_lock (&memcg_create_mutex);/* oom-kill-disable is a flag for subhierarchy. */ if ((parent->use_hierarchy) ||memcg_has_children (memcg)) { -cgroup_unlock (); +mutex_unlock (&memcg_create_mutex);return -EINVAL ; } memcg->oom_kill_disable = val;