aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom/af_netrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r--net/netrom/af_netrom.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 297b07a029de..d1fa1d9ffd2e 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -104,10 +104,9 @@ static void nr_remove_socket(struct sock *sk)
104static void nr_kill_by_device(struct net_device *dev) 104static void nr_kill_by_device(struct net_device *dev)
105{ 105{
106 struct sock *s; 106 struct sock *s;
107 struct hlist_node *node;
108 107
109 spin_lock_bh(&nr_list_lock); 108 spin_lock_bh(&nr_list_lock);
110 sk_for_each(s, node, &nr_list) 109 sk_for_each(s, &nr_list)
111 if (nr_sk(s)->device == dev) 110 if (nr_sk(s)->device == dev)
112 nr_disconnect(s, ENETUNREACH); 111 nr_disconnect(s, ENETUNREACH);
113 spin_unlock_bh(&nr_list_lock); 112 spin_unlock_bh(&nr_list_lock);
@@ -149,10 +148,9 @@ static void nr_insert_socket(struct sock *sk)
149static struct sock *nr_find_listener(ax25_address *addr) 148static struct sock *nr_find_listener(ax25_address *addr)
150{ 149{
151 struct sock *s; 150 struct sock *s;
152 struct hlist_node *node;
153 151
154 spin_lock_bh(&nr_list_lock); 152 spin_lock_bh(&nr_list_lock);
155 sk_for_each(s, node, &nr_list) 153 sk_for_each(s, &nr_list)
156 if (!ax25cmp(&nr_sk(s)->source_addr, addr) && 154 if (!ax25cmp(&nr_sk(s)->source_addr, addr) &&
157 s->sk_state == TCP_LISTEN) { 155 s->sk_state == TCP_LISTEN) {
158 bh_lock_sock(s); 156 bh_lock_sock(s);
@@ -170,10 +168,9 @@ found:
170static struct sock *nr_find_socket(unsigned char index, unsigned char id) 168static struct sock *nr_find_socket(unsigned char index, unsigned char id)
171{ 169{
172 struct sock *s; 170 struct sock *s;
173 struct hlist_node *node;
174 171
175 spin_lock_bh(&nr_list_lock); 172 spin_lock_bh(&nr_list_lock);
176 sk_for_each(s, node, &nr_list) { 173 sk_for_each(s, &nr_list) {
177 struct nr_sock *nr = nr_sk(s); 174 struct nr_sock *nr = nr_sk(s);
178 175
179 if (nr->my_index == index && nr->my_id == id) { 176 if (nr->my_index == index && nr->my_id == id) {
@@ -194,10 +191,9 @@ static struct sock *nr_find_peer(unsigned char index, unsigned char id,
194 ax25_address *dest) 191 ax25_address *dest)
195{ 192{
196 struct sock *s; 193 struct sock *s;
197 struct hlist_node *node;
198 194
199 spin_lock_bh(&nr_list_lock); 195 spin_lock_bh(&nr_list_lock);
200 sk_for_each(s, node, &nr_list) { 196 sk_for_each(s, &nr_list) {
201 struct nr_sock *nr = nr_sk(s); 197 struct nr_sock *nr = nr_sk(s);
202 198
203 if (nr->your_index == index && nr->your_id == id && 199 if (nr->your_index == index && nr->your_id == id &&