From bf65ae4fef113d78b7555db8520cd9f64817eda2 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Wed, 14 Mar 2012 18:28:09 +0530 Subject: glusterd: Fix brick op to prevent glusterd crashing Was building payload only for node types GD_NODE_BRICK & GD_NODE_NFS. Payload wasn't being built for nodes GD_NODE_SHD & GD_NODE_REBALANCE, which made glusterd crash when those operations were performed. Also fix a compile warning. Change-Id: Id33e21c84901d4d112c54514b7f16add31aeb950 BUG: 803313 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/2946 Tested-by: Gluster Build System Reviewed-by: Shishir Gowda --- xlators/mgmt/glusterd/src/glusterd-rpc-ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c index 1a10666c2..c4e9afaac 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c @@ -1853,16 +1853,16 @@ glusterd3_1_brick_op (call_frame_t *frame, xlator_t *this, if (!dummy_frame) continue; - if (pending_node->type == GD_NODE_BRICK) - ret = glusterd_brick_op_build_payload - (req_ctx->op, pending_node->node, - (gd1_mgmt_brick_op_req **)&req, - req_ctx->dict); - else if (pending_node->type == GD_NODE_NFS) + if (pending_node->type == GD_NODE_NFS) ret = glusterd_nfs_op_build_payload (req_ctx->op, (gd1_mgmt_brick_op_req **)&req, req_ctx->dict); + else + ret = glusterd_brick_op_build_payload + (req_ctx->op, pending_node->node, + (gd1_mgmt_brick_op_req **)&req, + req_ctx->dict); if (ret) goto out; -- cgit