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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 lock of course but it doesn't make it much more
> complicated...

Yeah, now look at the error exit path of the function.  You have to
reorder them too so that it matches the changed order above, which is
all fine and dandy, but one way is not necessarily better than the
other, so there's no good reason to incur that churn.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux