#include "ceph_debug.h"
#include <linux/types.h>
+#include <linux/slab.h>
#include <linux/random.h>
#include <linux/sched.h>
struct ceph_mon_client *monc = con->private;
int type = le16_to_cpu(hdr->type);
int front_len = le32_to_cpu(hdr->front_len);
- struct ceph_msg *m;
+ struct ceph_msg *m = NULL;
*skip = 0;
case CEPH_MSG_AUTH_REPLY:
m = ceph_msgpool_get(&monc->msgpool_auth_reply, front_len);
break;
- default:
- return NULL;
+ case CEPH_MSG_MON_MAP:
+ case CEPH_MSG_MDS_MAP:
+ case CEPH_MSG_OSD_MAP:
+ m = ceph_msg_new(type, front_len, 0, 0, NULL);
+ break;
}
- if (!m)
+ if (!m) {
+ pr_info("alloc_msg unknown type %d\n", type);
*skip = 1;
-
+ }
return m;
}