diff options
Diffstat (limited to 'net/netrom')
-rw-r--r-- | net/netrom/nr_route.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index b3b9097c87c7..c11737f472d6 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -725,15 +725,17 @@ void nr_link_failed(ax25_cb *ax25, int reason) | |||
725 | struct nr_node *nr_node = NULL; | 725 | struct nr_node *nr_node = NULL; |
726 | 726 | ||
727 | spin_lock_bh(&nr_neigh_list_lock); | 727 | spin_lock_bh(&nr_neigh_list_lock); |
728 | nr_neigh_for_each(s, node, &nr_neigh_list) | 728 | nr_neigh_for_each(s, node, &nr_neigh_list) { |
729 | if (s->ax25 == ax25) { | 729 | if (s->ax25 == ax25) { |
730 | nr_neigh_hold(s); | 730 | nr_neigh_hold(s); |
731 | nr_neigh = s; | 731 | nr_neigh = s; |
732 | break; | 732 | break; |
733 | } | 733 | } |
734 | } | ||
734 | spin_unlock_bh(&nr_neigh_list_lock); | 735 | spin_unlock_bh(&nr_neigh_list_lock); |
735 | 736 | ||
736 | if (nr_neigh == NULL) return; | 737 | if (nr_neigh == NULL) |
738 | return; | ||
737 | 739 | ||
738 | nr_neigh->ax25 = NULL; | 740 | nr_neigh->ax25 = NULL; |
739 | ax25_cb_put(ax25); | 741 | ax25_cb_put(ax25); |
@@ -743,11 +745,13 @@ void nr_link_failed(ax25_cb *ax25, int reason) | |||
743 | return; | 745 | return; |
744 | } | 746 | } |
745 | spin_lock_bh(&nr_node_list_lock); | 747 | spin_lock_bh(&nr_node_list_lock); |
746 | nr_node_for_each(nr_node, node, &nr_node_list) | 748 | nr_node_for_each(nr_node, node, &nr_node_list) { |
747 | nr_node_lock(nr_node); | 749 | nr_node_lock(nr_node); |
748 | if (nr_node->which < nr_node->count && nr_node->routes[nr_node->which].neighbour == nr_neigh) | 750 | if (nr_node->which < nr_node->count && |
751 | nr_node->routes[nr_node->which].neighbour == nr_neigh) | ||
749 | nr_node->which++; | 752 | nr_node->which++; |
750 | nr_node_unlock(nr_node); | 753 | nr_node_unlock(nr_node); |
754 | } | ||
751 | spin_unlock_bh(&nr_node_list_lock); | 755 | spin_unlock_bh(&nr_node_list_lock); |
752 | nr_neigh_put(nr_neigh); | 756 | nr_neigh_put(nr_neigh); |
753 | } | 757 | } |