Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-04 Thread Li Zefan
On 2012/11/1 3:44, Tejun Heo wrote: > This patch makes cgroup_create() fail if @parent is marked removed. > This is to prepare for further updates to cgroup_rmdir() path. > > Note that this change isn't strictly necessary. cgroup can only be > created via mkdir and the removed marking and dentry

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-02 Thread Kamezawa Hiroyuki
(2012/11/01 4:44), Tejun Heo wrote: > This patch makes cgroup_create() fail if @parent is marked removed. > This is to prepare for further updates to cgroup_rmdir() path. > > Note that this change isn't strictly necessary. cgroup can only be > created via mkdir and the removed marking and dentry

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-02 Thread Kamezawa Hiroyuki
(2012/10/31 13:22), Tejun Heo wrote: > This patch makes cgroup_create() fail if @parent is marked removed. > This is to prepare for further updates to cgroup_rmdir() path. > > Note that this change isn't strictly necessary. cgroup can only be > created via mkdir and the removed marking and dentry

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-01 Thread Tejun Heo
Hey, Michal. On Thu, Nov 01, 2012 at 04:15:56PM +0100, Michal Hocko wrote: > > if (!cgroup_lock_live_group(parent)) > > return -ENODEV; > > > > cgrp = kzalloc(sizeof(*cgrp), GFP_KERNEL); > > if (!cgrp) > > return -ENOMEM; > > this needs to drop the

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-01 Thread Michal Hocko
On Thu 01-11-12 16:05:32, Michal Hocko wrote: > On Thu 01-11-12 07:52:24, Tejun Heo wrote: > > Hey, Michal. > > > > On Thu, Nov 1, 2012 at 2:16 AM, Michal Hocko wrote: > > > I am not sure I understand. What does deactivate_super has to do with > > > the above suggestion? cgroup_lock_live_group wi

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-01 Thread Michal Hocko
On Thu 01-11-12 07:52:24, Tejun Heo wrote: > Hey, Michal. > > On Thu, Nov 1, 2012 at 2:16 AM, Michal Hocko wrote: > > I am not sure I understand. What does deactivate_super has to do with > > the above suggestion? cgroup_lock_live_group will take the cgroup_mutex > > on the success or frees the p

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-01 Thread Tejun Heo
Hey, Michal. On Thu, Nov 1, 2012 at 2:16 AM, Michal Hocko wrote: > I am not sure I understand. What does deactivate_super has to do with > the above suggestion? cgroup_lock_live_group will take the cgroup_mutex > on the success or frees the previously allocated&unused memory. The > only thing I w

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-01 Thread Michal Hocko
On Wed 31-10-12 10:04:31, Tejun Heo wrote: > Hey, Michal. > > On Wed, Oct 31, 2012 at 04:55:14PM +0100, Michal Hocko wrote: > > > + /* > > > + * Only live parents can have children. Note that the liveliness > > > + * check isn't strictly necessary because cgroup_mkdir() and > > > + * cgroup_rm

[PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-10-31 Thread Tejun Heo
This patch makes cgroup_create() fail if @parent is marked removed. This is to prepare for further updates to cgroup_rmdir() path. Note that this change isn't strictly necessary. cgroup can only be created via mkdir and the removed marking and dentry removal happen without releasing cgroup_mutex,

[PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-10-31 Thread Tejun Heo
This patch makes cgroup_create() fail if @parent is marked removed. This is to prepare for further updates to cgroup_rmdir() path. Note that this change isn't strictly necessary. cgroup can only be created via mkdir and the removed marking and dentry removal happen without releasing cgroup_mutex,

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-10-31 Thread Tejun Heo
Hey, Michal. On Wed, Oct 31, 2012 at 04:55:14PM +0100, Michal Hocko wrote: > > + /* > > +* Only live parents can have children. Note that the liveliness > > +* check isn't strictly necessary because cgroup_mkdir() and > > +* cgroup_rmdir() are fully synchronized by i_mutex; however,

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-10-31 Thread Michal Hocko
On Tue 30-10-12 21:22:40, Tejun Heo wrote: > This patch makes cgroup_create() fail if @parent is marked removed. > This is to prepare for further updates to cgroup_rmdir() path. > > Note that this change isn't strictly necessary. cgroup can only be > created via mkdir and the removed marking and

[PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-10-30 Thread Tejun Heo
This patch makes cgroup_create() fail if @parent is marked removed. This is to prepare for further updates to cgroup_rmdir() path. Note that this change isn't strictly necessary. cgroup can only be created via mkdir and the removed marking and dentry removal happen without releasing cgroup_mutex,