summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/afr/src/afr-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 571ba07045b..ca470716aee 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -495,7 +495,9 @@ afr_set_read_ctx_from_policy (xlator_t *this, inode_t *inode,
prev_read_child,
config_read_child,
NULL);
- afr_inode_set_read_ctx (this, inode, read_child, fresh_children);
+ if (read_child >= 0)
+ afr_inode_set_read_ctx (this, inode, read_child,
+ fresh_children);
}
/* afr_next_call_child ()