batman-adv: remove unused callback from batadv_algo_ops struct
authorMarek Lindner <mareklindner@neomailbox.ch>
Mon, 2 May 2016 13:58:50 +0000 (21:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:23:47 +0000 (15:23 +0200)
commit d9f179877e50ae2681fe7b0b83e0d9f63b6165ad upstream.

Reported-by: Lars Bußmann <ffsoest@kill-you.net>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
[sven@narfation.org: rewritten commit message to make clear that it is an
 bugfix to an user reported crash]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/batman-adv/originator.c
net/batman-adv/types.h

index 17851d3aaf224626dc758a2b9b161e1a847444f2..6282f021ddfb68fd2a4ead55431b3e79b1f96192 100644 (file)
@@ -197,18 +197,12 @@ static void batadv_neigh_node_release(struct batadv_neigh_node *neigh_node)
 {
        struct hlist_node *node_tmp;
        struct batadv_neigh_ifinfo *neigh_ifinfo;
-       struct batadv_algo_ops *bao;
-
-       bao = neigh_node->orig_node->bat_priv->bat_algo_ops;
 
        hlist_for_each_entry_safe(neigh_ifinfo, node_tmp,
                                  &neigh_node->ifinfo_list, list) {
                batadv_neigh_ifinfo_free_ref(neigh_ifinfo);
        }
 
-       if (bao->bat_neigh_free)
-               bao->bat_neigh_free(neigh_node);
-
        batadv_hardif_free_ref(neigh_node->if_incoming);
 
        kfree_rcu(neigh_node, rcu);
index d260efd70499bd62ceb7b86b57684f45a96612e9..cbd347c2e4a581c36405cb0b258ef0ad4ecb3e1e 100644 (file)
@@ -1136,8 +1136,6 @@ struct batadv_forw_packet {
  * @bat_neigh_is_equiv_or_better: check if neigh1 is equally good or better
  *  than neigh2 for their respective outgoing interface from the metric
  *  prospective
- * @bat_neigh_free: free the resources allocated by the routing algorithm for a
- *  neigh_node object
  * @bat_orig_print: print the originator table (optional)
  * @bat_orig_free: free the resources allocated by the routing algorithm for an
  *  orig_node object
@@ -1165,7 +1163,6 @@ struct batadv_algo_ops {
                 struct batadv_hard_iface *if_outgoing1,
                 struct batadv_neigh_node *neigh2,
                 struct batadv_hard_iface *if_outgoing2);
-       void (*bat_neigh_free)(struct batadv_neigh_node *neigh);
        /* orig_node handling API */
        void (*bat_orig_print)(struct batadv_priv *priv, struct seq_file *seq,
                               struct batadv_hard_iface *hard_iface);