aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/vis.c')
-rw-r--r--net/batman-adv/vis.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index 988296cdf7c5..de1022cacaf7 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -816,7 +816,7 @@ static void send_vis_packets(struct work_struct *work)
816 container_of(work, struct delayed_work, work); 816 container_of(work, struct delayed_work, work);
817 struct bat_priv *bat_priv = 817 struct bat_priv *bat_priv =
818 container_of(delayed_work, struct bat_priv, vis_work); 818 container_of(delayed_work, struct bat_priv, vis_work);
819 struct vis_info *info, *temp; 819 struct vis_info *info;
820 820
821 spin_lock_bh(&bat_priv->vis_hash_lock); 821 spin_lock_bh(&bat_priv->vis_hash_lock);
822 purge_vis_packets(bat_priv); 822 purge_vis_packets(bat_priv);
@@ -826,8 +826,9 @@ static void send_vis_packets(struct work_struct *work)
826 send_list_add(bat_priv, bat_priv->my_vis_info); 826 send_list_add(bat_priv, bat_priv->my_vis_info);
827 } 827 }
828 828
829 list_for_each_entry_safe(info, temp, &bat_priv->vis_send_list, 829 while (!list_empty(&bat_priv->vis_send_list)) {
830 send_list) { 830 info = list_first_entry(&bat_priv->vis_send_list,
831 typeof(*info), send_list);
831 832
832 kref_get(&info->refcount); 833 kref_get(&info->refcount);
833 spin_unlock_bh(&bat_priv->vis_hash_lock); 834 spin_unlock_bh(&bat_priv->vis_hash_lock);