lkml.org 
[lkml]   [2007]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] teach set_special_pids() to use struct pid
On 11/26, Eric W. Biederman wrote:
>
> Oleg Nesterov <oleg@tv-sign.ru> writes:
>
> > - set_special_pids(1, 1);
> > + if (current->nsproxy != &init_nsproxy) {
> > + get_nsproxy(&init_nsproxy);
> > + switch_task_namespaces(current, &init_nsproxy);
> > + }
>
> Is there a reason for moving this hunk of code?
>
> I don't see one as set_special_pids does everything with either
> struct pid or global pid values. And attach_pid and detach_pid
> don't care.

No particular reason, except "keep related code together".

There was another minor reason. Without the next patch we are doing find_pid(1).
This is correct, we scan the global namespace, but still it looks a bit tidier
to switch namespace first, so we could use find_vpid() in unlikely case we need
it.

Oleg.

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

\
 
 \ /
  Last update: 2007-11-26 21:21    [W:0.057 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site