diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2013-07-11 14:28:41 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-07-11 16:09:25 -0700 |
commit | 5bb136c4ca18cc4c058040ea6db312be13edb098 (patch) | |
tree | ffcb6cc1bd1a22da61656ff9a763390bdd373761 /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 6f7d308bf7e07a4202ab091382ccf9cd3c2b309c (diff) |
glusterd: Give up biglock before brick's rpc unref
This is to prevent the possibility of a deadlock when
rpc_connection_cleanup being called in the same thread as rpc_clnt_unref
Change-Id: Ia4dcc0a8a6e6158d4ddec68b780fccbc4cd64adb
BUG: 962619
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5321
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index cb91741e322..fea67e77564 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -1353,6 +1353,7 @@ int32_t glusterd_brick_disconnect (glusterd_brickinfo_t *brickinfo) { rpc_clnt_t *rpc = NULL; + glusterd_conf_t *priv = THIS->private; GF_ASSERT (brickinfo); @@ -1364,8 +1365,11 @@ glusterd_brick_disconnect (glusterd_brickinfo_t *brickinfo) rpc = brickinfo->rpc; brickinfo->rpc = NULL; - if (rpc) + if (rpc) { + synclock_unlock (&priv->big_lock); rpc_clnt_unref (rpc); + synclock_lock (&priv->big_lock); + } return 0; } |