summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/ceph/decode.h4
-rw-r--r--net/ceph/messenger.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h
index ce488d95be89..450384fe487c 100644
--- a/include/linux/ceph/decode.h
+++ b/include/linux/ceph/decode.h
@@ -221,7 +221,7 @@ static inline void ceph_encode_timespec64(struct ceph_timespec *tv,
221#define CEPH_ENTITY_ADDR_TYPE_NONE 0 221#define CEPH_ENTITY_ADDR_TYPE_NONE 0
222#define CEPH_ENTITY_ADDR_TYPE_LEGACY __cpu_to_le32(1) 222#define CEPH_ENTITY_ADDR_TYPE_LEGACY __cpu_to_le32(1)
223 223
224static inline void ceph_encode_addr(struct ceph_entity_addr *a) 224static inline void ceph_encode_banner_addr(struct ceph_entity_addr *a)
225{ 225{
226 __be16 ss_family = htons(a->in_addr.ss_family); 226 __be16 ss_family = htons(a->in_addr.ss_family);
227 a->in_addr.ss_family = *(__u16 *)&ss_family; 227 a->in_addr.ss_family = *(__u16 *)&ss_family;
@@ -229,7 +229,7 @@ static inline void ceph_encode_addr(struct ceph_entity_addr *a)
229 /* Banner addresses require TYPE_NONE */ 229 /* Banner addresses require TYPE_NONE */
230 a->type = CEPH_ENTITY_ADDR_TYPE_NONE; 230 a->type = CEPH_ENTITY_ADDR_TYPE_NONE;
231} 231}
232static inline void ceph_decode_addr(struct ceph_entity_addr *a) 232static inline void ceph_decode_banner_addr(struct ceph_entity_addr *a)
233{ 233{
234 __be16 ss_family = *(__be16 *)&a->in_addr.ss_family; 234 __be16 ss_family = *(__be16 *)&a->in_addr.ss_family;
235 a->in_addr.ss_family = ntohs(ss_family); 235 a->in_addr.ss_family = ntohs(ss_family);
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 0a3ef33cf7ac..0473d9a7b1f4 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -222,7 +222,7 @@ EXPORT_SYMBOL(ceph_pr_addr);
222static void encode_my_addr(struct ceph_messenger *msgr) 222static void encode_my_addr(struct ceph_messenger *msgr)
223{ 223{
224 memcpy(&msgr->my_enc_addr, &msgr->inst.addr, sizeof(msgr->my_enc_addr)); 224 memcpy(&msgr->my_enc_addr, &msgr->inst.addr, sizeof(msgr->my_enc_addr));
225 ceph_encode_addr(&msgr->my_enc_addr); 225 ceph_encode_banner_addr(&msgr->my_enc_addr);
226} 226}
227 227
228/* 228/*
@@ -1734,14 +1734,14 @@ static int read_partial_banner(struct ceph_connection *con)
1734 ret = read_partial(con, end, size, &con->actual_peer_addr); 1734 ret = read_partial(con, end, size, &con->actual_peer_addr);
1735 if (ret <= 0) 1735 if (ret <= 0)
1736 goto out; 1736 goto out;
1737 ceph_decode_addr(&con->actual_peer_addr); 1737 ceph_decode_banner_addr(&con->actual_peer_addr);
1738 1738
1739 size = sizeof (con->peer_addr_for_me); 1739 size = sizeof (con->peer_addr_for_me);
1740 end += size; 1740 end += size;
1741 ret = read_partial(con, end, size, &con->peer_addr_for_me); 1741 ret = read_partial(con, end, size, &con->peer_addr_for_me);
1742 if (ret <= 0) 1742 if (ret <= 0)
1743 goto out; 1743 goto out;
1744 ceph_decode_addr(&con->peer_addr_for_me); 1744 ceph_decode_banner_addr(&con->peer_addr_for_me);
1745 1745
1746out: 1746out:
1747 return ret; 1747 return ret;