aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipx/af_ipx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipx/af_ipx.c')
-rw-r--r--net/ipx/af_ipx.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index dfd6faaf0ea7..f547a47d381c 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -228,9 +228,8 @@ static struct sock *__ipxitf_find_socket(struct ipx_interface *intrfc,
228 __be16 port) 228 __be16 port)
229{ 229{
230 struct sock *s; 230 struct sock *s;
231 struct hlist_node *node;
232 231
233 sk_for_each(s, node, &intrfc->if_sklist) 232 sk_for_each(s, &intrfc->if_sklist)
234 if (ipx_sk(s)->port == port) 233 if (ipx_sk(s)->port == port)
235 goto found; 234 goto found;
236 s = NULL; 235 s = NULL;
@@ -259,12 +258,11 @@ static struct sock *ipxitf_find_internal_socket(struct ipx_interface *intrfc,
259 __be16 port) 258 __be16 port)
260{ 259{
261 struct sock *s; 260 struct sock *s;
262 struct hlist_node *node;
263 261
264 ipxitf_hold(intrfc); 262 ipxitf_hold(intrfc);
265 spin_lock_bh(&intrfc->if_sklist_lock); 263 spin_lock_bh(&intrfc->if_sklist_lock);
266 264
267 sk_for_each(s, node, &intrfc->if_sklist) { 265 sk_for_each(s, &intrfc->if_sklist) {
268 struct ipx_sock *ipxs = ipx_sk(s); 266 struct ipx_sock *ipxs = ipx_sk(s);
269 267
270 if (ipxs->port == port && 268 if (ipxs->port == port &&
@@ -282,14 +280,14 @@ found:
282static void __ipxitf_down(struct ipx_interface *intrfc) 280static void __ipxitf_down(struct ipx_interface *intrfc)
283{ 281{
284 struct sock *s; 282 struct sock *s;
285 struct hlist_node *node, *t; 283 struct hlist_node *t;
286 284
287 /* Delete all routes associated with this interface */ 285 /* Delete all routes associated with this interface */
288 ipxrtr_del_routes(intrfc); 286 ipxrtr_del_routes(intrfc);
289 287
290 spin_lock_bh(&intrfc->if_sklist_lock); 288 spin_lock_bh(&intrfc->if_sklist_lock);
291 /* error sockets */ 289 /* error sockets */
292 sk_for_each_safe(s, node, t, &intrfc->if_sklist) { 290 sk_for_each_safe(s, t, &intrfc->if_sklist) {
293 struct ipx_sock *ipxs = ipx_sk(s); 291 struct ipx_sock *ipxs = ipx_sk(s);
294 292
295 s->sk_err = ENOLINK; 293 s->sk_err = ENOLINK;
@@ -385,12 +383,11 @@ static int ipxitf_demux_socket(struct ipx_interface *intrfc,
385 int is_broadcast = !memcmp(ipx->ipx_dest.node, ipx_broadcast_node, 383 int is_broadcast = !memcmp(ipx->ipx_dest.node, ipx_broadcast_node,
386 IPX_NODE_LEN); 384 IPX_NODE_LEN);
387 struct sock *s; 385 struct sock *s;
388 struct hlist_node *node;
389 int rc; 386 int rc;
390 387
391 spin_lock_bh(&intrfc->if_sklist_lock); 388 spin_lock_bh(&intrfc->if_sklist_lock);
392 389
393 sk_for_each(s, node, &intrfc->if_sklist) { 390 sk_for_each(s, &intrfc->if_sklist) {
394 struct ipx_sock *ipxs = ipx_sk(s); 391 struct ipx_sock *ipxs = ipx_sk(s);
395 392
396 if (ipxs->port == ipx->ipx_dest.sock && 393 if (ipxs->port == ipx->ipx_dest.sock &&
@@ -446,12 +443,11 @@ static struct sock *ncp_connection_hack(struct ipx_interface *intrfc,
446 connection = (((int) *(ncphdr + 9)) << 8) | (int) *(ncphdr + 8); 443 connection = (((int) *(ncphdr + 9)) << 8) | (int) *(ncphdr + 8);
447 444
448 if (connection) { 445 if (connection) {
449 struct hlist_node *node;
450 /* Now we have to look for a special NCP connection handling 446 /* Now we have to look for a special NCP connection handling
451 * socket. Only these sockets have ipx_ncp_conn != 0, set by 447 * socket. Only these sockets have ipx_ncp_conn != 0, set by
452 * SIOCIPXNCPCONN. */ 448 * SIOCIPXNCPCONN. */
453 spin_lock_bh(&intrfc->if_sklist_lock); 449 spin_lock_bh(&intrfc->if_sklist_lock);
454 sk_for_each(sk, node, &intrfc->if_sklist) 450 sk_for_each(sk, &intrfc->if_sklist)
455 if (ipx_sk(sk)->ipx_ncp_conn == connection) { 451 if (ipx_sk(sk)->ipx_ncp_conn == connection) {
456 sock_hold(sk); 452 sock_hold(sk);
457 goto found; 453 goto found;