netns: make nsid_lock per net
The spinlock is used to protect netns_ids which is per net, so there is no need to use a global spinlock. Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4ab7f91381
commit
de133464c9
@@ -58,6 +58,7 @@ struct net {
|
||||
struct list_head exit_list; /* Use only net_mutex */
|
||||
|
||||
struct user_namespace *user_ns; /* Owning user namespace */
|
||||
spinlock_t nsid_lock;
|
||||
struct idr netns_ids;
|
||||
|
||||
struct ns_common ns;
|
||||
|
Reference in New Issue
Block a user