diff options
author | Guillaume Nault <gnault@redhat.com> | 2020-01-13 22:39:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-14 11:28:40 -0800 |
commit | 4905294162bda43bef65b411cf791005c7e15b28 (patch) | |
tree | 9af0ba1fed79d65b4c30438d9f274a6f2df35b39 /virt | |
parent | 621400366bdba122b37bfa5f5a64ebfd07919a4a (diff) | |
download | linux-4905294162bda43bef65b411cf791005c7e15b28.tar.gz linux-4905294162bda43bef65b411cf791005c7e15b28.tar.bz2 linux-4905294162bda43bef65b411cf791005c7e15b28.zip |
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>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions