Subject: Re: [PATCH net-next 4/6] netns: notify new nsid outside __peernet2id()

From: Nicolas Dichtel <[email-masked]>
Date: Wed, 06 May 2015 15:39:52 +0200

Le 06/05/2015 13:48, Thomas Graf a écrit :
[snip]
>
> Since you need the allocation behaviour from one call site only it
> might be cleaner to add a __peernet2id_alloc() which is used from
> the old __peernet2id() so you can call __peernet2id_alloc() from
> peernet2id_alloc() and avoid putting these ugly bool alloc = false
> in all other call sites.
You're absolutely right.

Side note:

bool false = false;
...
__peernet2id_alloc(net, peer, &false);

This compiles but the behavior is unexpected. In __peernet2id_alloc() the bool
is true. I need to think a bit more to explain that.