On Monday, 13 August 2018 03:04:41 HKT Sven Eckelmann wrote:
@@ -355,6 +356,8 @@ static void batadv_gw_node_add(struct batadv_priv *bat_priv, { struct batadv_gw_node *gw_node;
lockdep_assert_held(&bat_priv->gw.list_lock);
if (gateway->bandwidth_down == 0) return;
@@ -369,10 +372,8 @@ static void batadv_gw_node_add(struct batadv_priv *bat_priv, gw_node->bandwidth_down = ntohl(gateway->bandwidth_down); gw_node->bandwidth_up = ntohl(gateway->bandwidth_up);
spin_lock_bh(&bat_priv->gw.list_lock); kref_get(&gw_node->refcount); hlist_add_head_rcu(&gw_node->list, &bat_priv->gw.gateway_list);
spin_unlock_bh(&bat_priv->gw.list_lock);
Not mandatory but in other cases the function kernel doc received a hint that $some lock needs to be acquired before the function should be called.
Acked-by: Marek Lindner mareklindner@neomailbox.ch
Cheers, Marek