From 271068e96b79e8c3730f658a352b045491129c3b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 30 Jul 2012 18:19:45 -0700 Subject: [PATCH] --- yaml --- r: 320377 b: refs/heads/master c: 6139919133377652992a5fe134e22abce3e9c25e h: refs/heads/master i: 320375: 326d44ea918ec3d919ffdccd95b922be82a06363 v: v3 --- [refs] | 2 +- trunk/net/ceph/messenger.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 5823d2ad2e69..dc8268023aa6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4740a623d20c51d167da7f752b63e2b8714b2543 +refs/heads/master: 6139919133377652992a5fe134e22abce3e9c25e diff --git a/trunk/net/ceph/messenger.c b/trunk/net/ceph/messenger.c index 13b549b6b1bf..b6655b131558 100644 --- a/trunk/net/ceph/messenger.c +++ b/trunk/net/ceph/messenger.c @@ -2735,9 +2735,16 @@ static int ceph_con_in_msg_alloc(struct ceph_connection *con, int *skip) BUG_ON(con->in_msg != NULL); if (con->ops->alloc_msg) { + struct ceph_msg *msg; + mutex_unlock(&con->mutex); - con->in_msg = con->ops->alloc_msg(con, hdr, skip); + msg = con->ops->alloc_msg(con, hdr, skip); mutex_lock(&con->mutex); + if (con->state != CON_STATE_OPEN) { + ceph_msg_put(msg); + return -EAGAIN; + } + con->in_msg = msg; if (con->in_msg) { con->in_msg->con = con->ops->get(con); BUG_ON(con->in_msg->con == NULL);