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

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

 



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>

> ---
>  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. */
>        }
>
>
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux