From 4235f7a74e0c4c637f1db2f49624a972d72b12fb Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Mon, 3 Oct 2011 16:01:25 +0530 Subject: cluster/afr: set the read child ctx only if the self-heal source is valid Change-Id: Ifdf0db71594ce526ad85c21103726798d9aceef4 BUG: 3639 Reviewed-on: http://review.gluster.com/556 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-self-heal-entry.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 0481d915d..5a3302f7f 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -2130,10 +2130,10 @@ afr_sh_entry_fix (call_frame_t *frame, xlator_t *this, afr_reset_children (sh->fresh_children, priv->child_count); afr_get_fresh_children (sh->success_children, sh->sources, - sh->fresh_children, priv->child_count); - afr_inode_set_read_ctx (this, sh->inode, sh->source, - sh->fresh_children); - + sh->fresh_children, priv->child_count); + if (sh->source >= 0) + afr_inode_set_read_ctx (this, sh->inode, sh->source, + sh->fresh_children); heal: afr_sh_entry_sync_prepare (frame, this); -- cgit