[Devel] Re: [PATCH 1/4] Virtualization/containers: introduction

Dave Hansen haveblue at us.ibm.com
Mon Feb 6 15:00:58 PST 2006


On Tue, 2006-02-07 at 00:57 +0300, Kirill Korotaev wrote:
> @@ -1132,6 +1133,7 @@ static task_t *copy_process(unsigned lon
>         p->ioprio = current->ioprio;
>  
>         SET_LINKS(p);
> +       (void)get_container(p->container);
>         if (unlikely(p->ptrace & PT_PTRACED))
>                 __ptrace_link(p, current->parent); 

This entire patch looks nice and very straightforward, except for this
bit. :)  The "(void)" bit isn't usual kernel coding style.  You can
probably kill it.

BTW, why does get_container() return the container argument?
get_task_struct(), for instance is just a do{}while(0) loop, so it
doesn't have a return value.  Is there some magic later on in your patch
set that utilizes this?

One other really minor thing: I usually try to do is keep the !
CONFIG_FOO functions static inlines, just like the full versions.  The
advantage is that you get some compile-time type checking, even when
your CONFIG option is off.

-- Dave




More information about the Devel mailing list