diff options
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-read.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index f74deab6df3..4205c157d6e 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -148,12 +148,14 @@ out: int32_t afr_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, - gf_dirent_t *buf) + gf_dirent_t *entries) { afr_private_t * priv = NULL; afr_local_t * local = NULL; xlator_t ** children = NULL; + gf_dirent_t * entry = NULL; + int unwind = 1; int last_tried = -1; int this_try = -1; @@ -185,10 +187,13 @@ afr_readdir_cbk (call_frame_t *frame, void *cookie, out: if (unwind) { - buf->d_ino = afr_itransform (buf->d_ino, priv->child_count, - child_index); + list_for_each_entry (entry, &entries->list, list) { + entry->d_ino = afr_itransform (entry->d_ino, + priv->child_count, + child_index); + } - AFR_STACK_UNWIND (frame, op_ret, op_errno, buf); + AFR_STACK_UNWIND (frame, op_ret, op_errno, entries); } return 0; |