Re: [PATCH 1/2] cgroups: Fix to return errno in a failure path

From: KAMEZAWA Hiroyuki
Date: Tue Jan 26 2010 - 19:09:01 EST


On Tue, 26 Jan 2010 15:01:26 -0800
Paul Menage <menage@xxxxxxxxxx> wrote:

> On Tue, Jan 26, 2010 at 12:16 AM, Li Zefan <lizf@xxxxxxxxxxxxxx> wrote:
> >
> > Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>
>
> Acked-by: Paul Menage <menage@xxxxxxxxxx>
>
Thank you.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>

> > ---
> > Âcgroup.c | Â Â7 +++++--
> > Â1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > --- a/kernel/cgroup.c.orig   Â2010-01-19 16:37:37.000000000 +0800
> > +++ a/kernel/cgroup.c  2010-01-19 16:39:07.000000000 +0800
> > @@ -3279,14 +3279,17 @@ static long cgroup_create(struct cgroup
> >
> > Â Â Â Âfor_each_subsys(root, ss) {
> > Â Â Â Â Â Â Â Âstruct cgroup_subsys_state *css = ss->create(ss, cgrp);
> > +
> > Â Â Â Â Â Â Â Âif (IS_ERR(css)) {
> > Â Â Â Â Â Â Â Â Â Â Â Âerr = PTR_ERR(css);
> > Â Â Â Â Â Â Â Â Â Â Â Âgoto err_destroy;
> > Â Â Â Â Â Â Â Â}
> > Â Â Â Â Â Â Â Âinit_cgroup_css(css, ss, cgrp);
> > - Â Â Â Â Â Â Â if (ss->use_id)
> > - Â Â Â Â Â Â Â Â Â Â Â if (alloc_css_id(ss, parent, cgrp))
> > + Â Â Â Â Â Â Â if (ss->use_id) {
> > + Â Â Â Â Â Â Â Â Â Â Â err = alloc_css_id(ss, parent, cgrp);
> > + Â Â Â Â Â Â Â Â Â Â Â if (err)
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âgoto err_destroy;
> > + Â Â Â Â Â Â Â }
> > Â Â Â Â Â Â Â Â/* At error, ->destroy() callback has to free assigned ID. */
> > Â Â Â Â}
> >
> >
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/