aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-06-04 15:43:32 -0400
committerAlex Elder <elder@dreamhost.com>2012-06-06 10:23:54 -0400
commit1c20f2d26795803fc4f5155fe4fca5717a5944b6 (patch)
tree9939afc993d7ab8244518777b742f36dd3e038da /net/ceph/osd_client.c
parent1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7 (diff)
libceph: tweak ceph_alloc_msg()
The function ceph_alloc_msg() is only used to allocate a message that will be assigned to a connection's in_msg pointer. Rename the function so this implied usage is more clear. In addition, make that assignment inside the function (again, since that's precisely what it's intended to be used for). This allows us to return what is now provided via the passed-in address of a "skip" variable. The return type is now Boolean to be explicit that there are only two possible outcomes. Make sure the result of an ->alloc_msg method call always sets the value of *skip properly. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 448c9da8beff..24b427b1eca4 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -2077,6 +2077,7 @@ static struct ceph_msg *alloc_msg(struct ceph_connection *con,
2077 int type = le16_to_cpu(hdr->type); 2077 int type = le16_to_cpu(hdr->type);
2078 int front = le32_to_cpu(hdr->front_len); 2078 int front = le32_to_cpu(hdr->front_len);
2079 2079
2080 *skip = 0;
2080 switch (type) { 2081 switch (type) {
2081 case CEPH_MSG_OSD_MAP: 2082 case CEPH_MSG_OSD_MAP:
2082 case CEPH_MSG_WATCH_NOTIFY: 2083 case CEPH_MSG_WATCH_NOTIFY: