Searched hist:"4905294162 bda43bef65b411cf791005c7e15b28" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/core/ |
H A D | net_namespace.c | diff 4905294162bda43bef65b411cf791005c7e15b28 Mon Jan 13 15:39:20 CST 2020 Guillaume Nault <gnault@redhat.com> netns: Remove __peernet2id_alloc()
__peernet2id_alloc() was used for both plain lookups and for netns ID allocations (depending the value of '*alloc'). Let's separate lookups from allocations instead. That is, integrate the lookup code into __peernet2id() and make peernet2id_alloc() responsible for allocating new netns IDs when necessary.
This makes it clear that __peernet2id() doesn't modify the idr and prepares the code for lockless lookups.
Also, mark the 'net' argument of __peernet2id() as 'const', since we're modifying this line.
Signed-off-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|