aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/batman-adv/originator.c5
-rw-r--r--net/batman-adv/types.h3
2 files changed, 0 insertions, 8 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index b0bad5726557..076d258c92e1 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -251,10 +251,8 @@ static void batadv_neigh_node_release(struct kref *ref)
251 struct hlist_node *node_tmp; 251 struct hlist_node *node_tmp;
252 struct batadv_neigh_node *neigh_node; 252 struct batadv_neigh_node *neigh_node;
253 struct batadv_neigh_ifinfo *neigh_ifinfo; 253 struct batadv_neigh_ifinfo *neigh_ifinfo;
254 struct batadv_algo_ops *bao;
255 254
256 neigh_node = container_of(ref, struct batadv_neigh_node, refcount); 255 neigh_node = container_of(ref, struct batadv_neigh_node, refcount);
257 bao = neigh_node->orig_node->bat_priv->bat_algo_ops;
258 256
259 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp, 257 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp,
260 &neigh_node->ifinfo_list, list) { 258 &neigh_node->ifinfo_list, list) {
@@ -263,9 +261,6 @@ static void batadv_neigh_node_release(struct kref *ref)
263 261
264 batadv_hardif_neigh_put(neigh_node->hardif_neigh); 262 batadv_hardif_neigh_put(neigh_node->hardif_neigh);
265 263
266 if (bao->bat_neigh_free)
267 bao->bat_neigh_free(neigh_node);
268
269 batadv_hardif_put(neigh_node->if_incoming); 264 batadv_hardif_put(neigh_node->if_incoming);
270 265
271 kfree_rcu(neigh_node, rcu); 266 kfree_rcu(neigh_node, rcu);
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 6a577f4f8ba7..114d1509946b 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1278,8 +1278,6 @@ struct batadv_forw_packet {
1278 * better than neigh2 for their respective outgoing interface from the metric 1278 * better than neigh2 for their respective outgoing interface from the metric
1279 * prospective 1279 * prospective
1280 * @bat_neigh_print: print the single hop neighbor list (optional) 1280 * @bat_neigh_print: print the single hop neighbor list (optional)
1281 * @bat_neigh_free: free the resources allocated by the routing algorithm for a
1282 * neigh_node object
1283 * @bat_orig_print: print the originator table (optional) 1281 * @bat_orig_print: print the originator table (optional)
1284 * @bat_orig_free: free the resources allocated by the routing algorithm for an 1282 * @bat_orig_free: free the resources allocated by the routing algorithm for an
1285 * orig_node object 1283 * orig_node object
@@ -1310,7 +1308,6 @@ struct batadv_algo_ops {
1310 struct batadv_neigh_node *neigh2, 1308 struct batadv_neigh_node *neigh2,
1311 struct batadv_hard_iface *if_outgoing2); 1309 struct batadv_hard_iface *if_outgoing2);
1312 void (*bat_neigh_print)(struct batadv_priv *priv, struct seq_file *seq); 1310 void (*bat_neigh_print)(struct batadv_priv *priv, struct seq_file *seq);
1313 void (*bat_neigh_free)(struct batadv_neigh_node *neigh);
1314 /* orig_node handling API */ 1311 /* orig_node handling API */
1315 void (*bat_orig_print)(struct batadv_priv *priv, struct seq_file *seq, 1312 void (*bat_orig_print)(struct batadv_priv *priv, struct seq_file *seq,
1316 struct batadv_hard_iface *hard_iface); 1313 struct batadv_hard_iface *hard_iface);