summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-03-14 18:28:09 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-14 09:51:13 -0700
commitbf65ae4fef113d78b7555db8520cd9f64817eda2 (patch)
tree5ded3baa3a34ef67724b6b1d7769aa71be44335c /xlators
parent160ff641157359dc60d1a37652ef449b3c21ebad (diff)
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 <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2946 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c12
1 files changed, 6 insertions, 6 deletions
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;