Browse Source

libnetwork/overlay: don't lock network when accessing subnet vni

Since a few commits, subnet's vni don't change during the lifetime of
the subnet struct, so there's no need to lock the network before
accessing it.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
Albin Kerouanton 2 years ago
parent
commit
f32f09e78f
1 changed files with 0 additions and 6 deletions
  1. 0 6
      libnetwork/drivers/overlay/ov_network.go

+ 0 - 6
libnetwork/drivers/overlay/ov_network.go

@@ -703,12 +703,6 @@ func (n *network) sandbox() osl.Sandbox {
 	return n.sbox
 	return n.sbox
 }
 }
 
 
-func (n *network) vxlanID(s *subnet) uint32 {
-	n.Lock()
-	defer n.Unlock()
-	return s.vni
-}
-
 func (n *network) Key() []string {
 func (n *network) Key() []string {
 	return []string{"overlay", "network", n.id}
 	return []string{"overlay", "network", n.id}
 }
 }