diff options
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 6ff3c80924d..29dec5669d5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -1011,12 +1011,15 @@ glusterd_friend_cleanup (glusterd_peerinfo_t *peerinfo)          GF_ASSERT (peerinfo);          glusterd_peerctx_t      *peerctx = NULL;          gf_boolean_t            quorum_action = _gf_false; +        glusterd_conf_t         *priv = THIS->private;          if (peerinfo->quorum_contrib != QUORUM_NONE)                  quorum_action = _gf_true;          if (peerinfo->rpc) {                  /* cleanup the saved-frames before last unref */ +                synclock_unlock (&priv->big_lock);                  rpc_clnt_connection_cleanup (&peerinfo->rpc->conn); +                synclock_lock (&priv->big_lock);                  peerctx = peerinfo->rpc->mydata;                  peerinfo->rpc->mydata = NULL; @@ -1462,10 +1465,13 @@ int32_t  glusterd_brick_disconnect (glusterd_brickinfo_t *brickinfo)  {          GF_ASSERT (brickinfo); +        glusterd_conf_t         *priv = THIS->private;          if (brickinfo->rpc) {                  /* cleanup the saved-frames before last unref */ +                synclock_unlock (&priv->big_lock);                  rpc_clnt_connection_cleanup (&brickinfo->rpc->conn); +                synclock_lock (&priv->big_lock);                  rpc_clnt_unref (brickinfo->rpc);                  brickinfo->rpc = NULL; @@ -3436,11 +3442,14 @@ int32_t  glusterd_nodesvc_disconnect (char *server)  {          struct rpc_clnt         *rpc = NULL; +        glusterd_conf_t         *priv = THIS->private;          rpc = glusterd_nodesvc_get_rpc (server);          if (rpc) { +                synclock_unlock (&priv->big_lock);                  rpc_clnt_connection_cleanup (&rpc->conn); +                synclock_lock (&priv->big_lock);                  rpc_clnt_unref (rpc);                  (void)glusterd_nodesvc_set_rpc (server, NULL);          }  | 
