From 33c568ce1a28c1739f095611b40b7acf40e4e6df Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Wed, 18 Jan 2012 13:59:32 +0530 Subject: glusterd: Fixed crash in stop volume found using efence. Change-Id: I84d38b8af248920a1559d05f0e4f43d3eda0f43e BUG: 782710 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.com/2651 Reviewed-by: Pranith Kumar Karampuri Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'xlators') 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; -- cgit