Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74620
b: refs/heads/master
c: 97bd791
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Dec 5, 2007
1 parent 4d3f5d8 commit 65a2ca6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e46aa5c8cb1347853de9ec86f3fa440f9dc9d77
refs/heads/master: 97bd7919e2c1445dabbcc2686795dbb52316b923
20 changes: 6 additions & 14 deletions trunk/fs/ocfs2/cluster/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,6 @@

#include "tcp_internal.h"

/*
* The linux network stack isn't sparse endian clean.. It has macros like
* ntohs() which perform the endian checks and structs like sockaddr_in
* which aren't annotated. So __force is found here to get the build
* clean. When they emerge from the dark ages and annotate the code
* we can remove these.
*/

#define SC_NODEF_FMT "node %s (num %u) at %u.%u.%u.%u:%u"
#define SC_NODEF_ARGS(sc) sc->sc_node->nd_name, sc->sc_node->nd_num, \
NIPQUAD(sc->sc_node->nd_ipv4_address), \
Expand Down Expand Up @@ -1500,7 +1492,7 @@ static void o2net_start_connect(struct work_struct *work)

myaddr.sin_family = AF_INET;
myaddr.sin_addr.s_addr = mynode->nd_ipv4_address;
myaddr.sin_port = (__force u16)htons(0); /* any port */
myaddr.sin_port = htons(0); /* any port */

ret = sock->ops->bind(sock, (struct sockaddr *)&myaddr,
sizeof(myaddr));
Expand Down Expand Up @@ -1701,11 +1693,11 @@ static int o2net_accept_one(struct socket *sock)
if (ret < 0)
goto out;

node = o2nm_get_node_by_ip((__force __be32)sin.sin_addr.s_addr);
node = o2nm_get_node_by_ip(sin.sin_addr.s_addr);
if (node == NULL) {
mlog(ML_NOTICE, "attempt to connect from unknown node at "
"%u.%u.%u.%u:%d\n", NIPQUAD(sin.sin_addr.s_addr),
ntohs((__force __be16)sin.sin_port));
ntohs(sin.sin_port));
ret = -EINVAL;
goto out;
}
Expand All @@ -1714,7 +1706,7 @@ static int o2net_accept_one(struct socket *sock)
mlog(ML_NOTICE, "unexpected connect attempted from a lower "
"numbered node '%s' at " "%u.%u.%u.%u:%d with num %u\n",
node->nd_name, NIPQUAD(sin.sin_addr.s_addr),
ntohs((__force __be16)sin.sin_port), node->nd_num);
ntohs(sin.sin_port), node->nd_num);
ret = -EINVAL;
goto out;
}
Expand All @@ -1725,7 +1717,7 @@ static int o2net_accept_one(struct socket *sock)
mlog(ML_CONN, "attempt to connect from node '%s' at "
"%u.%u.%u.%u:%d but it isn't heartbeating\n",
node->nd_name, NIPQUAD(sin.sin_addr.s_addr),
ntohs((__force __be16)sin.sin_port));
ntohs(sin.sin_port));
ret = -EINVAL;
goto out;
}
Expand All @@ -1742,7 +1734,7 @@ static int o2net_accept_one(struct socket *sock)
mlog(ML_NOTICE, "attempt to connect from node '%s' at "
"%u.%u.%u.%u:%d but it already has an open connection\n",
node->nd_name, NIPQUAD(sin.sin_addr.s_addr),
ntohs((__force __be16)sin.sin_port));
ntohs(sin.sin_port));
goto out;
}

Expand Down

0 comments on commit 65a2ca6

Please sign in to comment.