diff options
author | Krishnan Parthasarathi <kp@gluster.com> | 2012-01-18 13:59:32 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-01-19 22:59:10 -0800 |
commit | 33c568ce1a28c1739f095611b40b7acf40e4e6df (patch) | |
tree | 7dbe1ec16a1a0b5d81cded6812948c4a81bc58ba /xlators/mgmt | |
parent | 9b389a3f76bc858f95e498c1539317c7a8bc6188 (diff) |
glusterd: Fixed crash in stop volume found using efence.
Change-Id: I84d38b8af248920a1559d05f0e4f43d3eda0f43e
BUG: 782710
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2651
Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 68a98b16b7b..d7258191031 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2922,6 +2922,7 @@ glusterd_op_ac_rcvd_brick_op_acc (glusterd_op_sm_event_t *event, void *ctx) glusterd_op_t op = GD_OP_NONE; dict_t *op_ctx = NULL; glusterd_req_ctx_t *req_ctx = NULL; + void *pending_entry = NULL; GF_ASSERT (event); GF_ASSERT (ctx); @@ -2932,9 +2933,10 @@ glusterd_op_ac_rcvd_brick_op_acc (glusterd_op_sm_event_t *event, void *ctx) op = req_ctx->op; op_ctx = glusterd_op_get_ctx (); + pending_entry = ev_ctx->pending_node->node; ret = glusterd_remove_pending_entry (&opinfo.pending_bricks, - ev_ctx->pending_node->node); + pending_entry); if (ret) { gf_log ("glusterd", GF_LOG_ERROR, "unknown response received "); ret = -1; @@ -2944,8 +2946,9 @@ glusterd_op_ac_rcvd_brick_op_acc (glusterd_op_sm_event_t *event, void *ctx) if (opinfo.brick_pending_count > 0) opinfo.brick_pending_count--; - glusterd_handle_brick_rsp (ev_ctx->pending_node->node, op, ev_ctx->rsp_dict, - op_ctx, &op_errstr); + glusterd_handle_brick_rsp (pending_entry, op, ev_ctx->rsp_dict, + op_ctx, &op_errstr); + if (opinfo.brick_pending_count > 0) goto out; |