aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster/tcp.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-31 03:56:28 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-31 03:56:28 -0400
commitbe859405487324ed548f1ba11dc949b8230ab991 (patch)
tree3893ac2ce3b212b100d9e1e1e3e2fc1fa0c3f47f /fs/ocfs2/cluster/tcp.c
parent63779436ab4ad0867bcea53bf853b0004d7b895d (diff)
fs: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/ocfs2/cluster/tcp.c')
-rw-r--r--fs/ocfs2/cluster/tcp.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 2bcf706d9dd3..9fbe849f6344 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -1597,8 +1597,8 @@ static void o2net_start_connect(struct work_struct *work)
1597 ret = sock->ops->bind(sock, (struct sockaddr *)&myaddr, 1597 ret = sock->ops->bind(sock, (struct sockaddr *)&myaddr,
1598 sizeof(myaddr)); 1598 sizeof(myaddr));
1599 if (ret) { 1599 if (ret) {
1600 mlog(ML_ERROR, "bind failed with %d at address %u.%u.%u.%u\n", 1600 mlog(ML_ERROR, "bind failed with %d at address %pI4\n",
1601 ret, NIPQUAD(mynode->nd_ipv4_address)); 1601 ret, &mynode->nd_ipv4_address);
1602 goto out; 1602 goto out;
1603 } 1603 }
1604 1604
@@ -1790,17 +1790,16 @@ static int o2net_accept_one(struct socket *sock)
1790 1790
1791 node = o2nm_get_node_by_ip(sin.sin_addr.s_addr); 1791 node = o2nm_get_node_by_ip(sin.sin_addr.s_addr);
1792 if (node == NULL) { 1792 if (node == NULL) {
1793 mlog(ML_NOTICE, "attempt to connect from unknown node at " 1793 mlog(ML_NOTICE, "attempt to connect from unknown node at %pI4:%d\n",
1794 "%u.%u.%u.%u:%d\n", NIPQUAD(sin.sin_addr.s_addr), 1794 &sin.sin_addr.s_addr, ntohs(sin.sin_port));
1795 ntohs(sin.sin_port));
1796 ret = -EINVAL; 1795 ret = -EINVAL;
1797 goto out; 1796 goto out;
1798 } 1797 }
1799 1798
1800 if (o2nm_this_node() > node->nd_num) { 1799 if (o2nm_this_node() > node->nd_num) {
1801 mlog(ML_NOTICE, "unexpected connect attempted from a lower " 1800 mlog(ML_NOTICE, "unexpected connect attempted from a lower "
1802 "numbered node '%s' at " "%u.%u.%u.%u:%d with num %u\n", 1801 "numbered node '%s' at " "%pI4:%d with num %u\n",
1803 node->nd_name, NIPQUAD(sin.sin_addr.s_addr), 1802 node->nd_name, &sin.sin_addr.s_addr,
1804 ntohs(sin.sin_port), node->nd_num); 1803 ntohs(sin.sin_port), node->nd_num);
1805 ret = -EINVAL; 1804 ret = -EINVAL;
1806 goto out; 1805 goto out;
@@ -1810,8 +1809,8 @@ static int o2net_accept_one(struct socket *sock)
1810 * and tries to connect before we see their heartbeat */ 1809 * and tries to connect before we see their heartbeat */
1811 if (!o2hb_check_node_heartbeating_from_callback(node->nd_num)) { 1810 if (!o2hb_check_node_heartbeating_from_callback(node->nd_num)) {
1812 mlog(ML_CONN, "attempt to connect from node '%s' at " 1811 mlog(ML_CONN, "attempt to connect from node '%s' at "
1813 "%u.%u.%u.%u:%d but it isn't heartbeating\n", 1812 "%pI4:%d but it isn't heartbeating\n",
1814 node->nd_name, NIPQUAD(sin.sin_addr.s_addr), 1813 node->nd_name, &sin.sin_addr.s_addr,
1815 ntohs(sin.sin_port)); 1814 ntohs(sin.sin_port));
1816 ret = -EINVAL; 1815 ret = -EINVAL;
1817 goto out; 1816 goto out;
@@ -1827,8 +1826,8 @@ static int o2net_accept_one(struct socket *sock)
1827 spin_unlock(&nn->nn_lock); 1826 spin_unlock(&nn->nn_lock);
1828 if (ret) { 1827 if (ret) {
1829 mlog(ML_NOTICE, "attempt to connect from node '%s' at " 1828 mlog(ML_NOTICE, "attempt to connect from node '%s' at "
1830 "%u.%u.%u.%u:%d but it already has an open connection\n", 1829 "%pI4:%d but it already has an open connection\n",
1831 node->nd_name, NIPQUAD(sin.sin_addr.s_addr), 1830 node->nd_name, &sin.sin_addr.s_addr,
1832 ntohs(sin.sin_port)); 1831 ntohs(sin.sin_port));
1833 goto out; 1832 goto out;
1834 } 1833 }
@@ -1924,15 +1923,15 @@ static int o2net_open_listening_sock(__be32 addr, __be16 port)
1924 sock->sk->sk_reuse = 1; 1923 sock->sk->sk_reuse = 1;
1925 ret = sock->ops->bind(sock, (struct sockaddr *)&sin, sizeof(sin)); 1924 ret = sock->ops->bind(sock, (struct sockaddr *)&sin, sizeof(sin));
1926 if (ret < 0) { 1925 if (ret < 0) {
1927 mlog(ML_ERROR, "unable to bind socket at %u.%u.%u.%u:%u, " 1926 mlog(ML_ERROR, "unable to bind socket at %pI4:%u, "
1928 "ret=%d\n", NIPQUAD(addr), ntohs(port), ret); 1927 "ret=%d\n", &addr, ntohs(port), ret);
1929 goto out; 1928 goto out;
1930 } 1929 }
1931 1930
1932 ret = sock->ops->listen(sock, 64); 1931 ret = sock->ops->listen(sock, 64);
1933 if (ret < 0) { 1932 if (ret < 0) {
1934 mlog(ML_ERROR, "unable to listen on %u.%u.%u.%u:%u, ret=%d\n", 1933 mlog(ML_ERROR, "unable to listen on %pI4:%u, ret=%d\n",
1935 NIPQUAD(addr), ntohs(port), ret); 1934 &addr, ntohs(port), ret);
1936 } 1935 }
1937 1936
1938out: 1937out: