diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-09-27 14:44:01 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-10-19 03:17:17 -0700 |
commit | b80a2a150b874031df35af8d4f06657906024861 (patch) | |
tree | 9205dd82c4614d14104cd27a2ac4ddde42a3d8bf /xlators/cluster/afr/src/afr-self-heal-data.c | |
parent | eab187ce06f6d72aeba297604e132d181da4c502 (diff) |
cluster/afr: Handle files without gfid
Change-Id: Ie831ae8542c1382c17fb7837cd18b0e4e4d3db75
BUG: 3734
Reviewed-on: http://review.gluster.com/619
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-data.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-data.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 6ce7106698d..11d6745b446 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -812,11 +812,8 @@ afr_lookup_select_read_child_by_txn_type (xlator_t *this, afr_local_t *local, if (NULL == pending_matrix) goto out; - sources = GF_CALLOC (sizeof (*sources), priv->child_count, - gf_afr_mt_int32_t); - if (NULL == sources) - goto out; - + sources = local->cont.lookup.sources; + memset (sources, 0, sizeof (*sources) * priv->child_count); afr_build_pending_matrix (priv->pending_key, pending_matrix, xattr, txn_type, priv->child_count); @@ -840,13 +837,8 @@ afr_lookup_select_read_child_by_txn_type (xlator_t *this, afr_local_t *local, config_read_child, valid_children); ret = 0; - local->cont.lookup.sources = sources; out: afr_destroy_pending_matrix (pending_matrix, priv->child_count); - if (-1 == ret) { - if (sources) - GF_FREE (sources); - } gf_log (this->name, GF_LOG_DEBUG, "returning read_child: %d", read_child); return read_child; } |