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>
This commit is contained in:
Albin Kerouanton 2023-03-06 13:25:18 +01:00
parent b67446a8fa
commit f32f09e78f
No known key found for this signature in database
GPG key ID: 630B8E1DCBDB1864

View file

@ -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}
}