diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2015-05-15 21:47:32 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-18 03:41:11 (GMT) |
commit | de133464c9e70808d3e5a861294bc55940988178 (patch) | |
tree | e39d1ddfa88dba0fa77a908513b392648c7e5bda /include/net/net_namespace.h | |
parent | 4ab7f9138147efbb3efab32a51a8da646769d740 (diff) | |
download | linux-de133464c9e70808d3e5a861294bc55940988178.tar.xz |
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>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 3f850ac..72eb237 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -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; |