On 2019/10/15 16:30, Ilya Dryomov wrote:
On Tue, Oct 15, 2019 at 4:52 AM <xiubli@xxxxxxxxxx> wrote:
From: Xiubo Li <xiubli@xxxxxxxxxx>
There is no reason that the con->private will be NULL for mon client,
once it is here in dispatch() routine the con->monc->private should
already correctly set done. And also just before the dispatch() in
try_read() it will also reference the con->monc->private to allocate
memory for in_msg.
Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
---
net/ceph/mon_client.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 7256c402ebaa..9d9e4e4ea600 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -1233,9 +1233,6 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg)
struct ceph_mon_client *monc = con->private;
int type = le16_to_cpu(msg->hdr.type);
- if (!monc)
- return;
-
switch (type) {
case CEPH_MSG_AUTH_REPLY:
handle_auth_reply(monc, msg);
Hi Xiubo,
I applied the same patch yesterday:
Ah, Cool.
I missed that mail.
Xiubo
https://github.com/ceph/ceph-client/commit/dd6b2054abec7e9a50c330619b870a018a5fd718
Thanks,
Ilya