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 năm trước cách đây
mục cha
commit
f32f09e78f
1 tập tin đã thay đổi với 0 bổ sung6 xóa
  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
 }
 
-func (n *network) vxlanID(s *subnet) uint32 {
-	n.Lock()
-	defer n.Unlock()
-	return s.vni
-}
-
 func (n *network) Key() []string {
 	return []string{"overlay", "network", n.id}
 }