summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-11-18 07:02:25 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-19 00:52:59 -0800
commit7a6b1de614c6db02eeb437c06fd2568ccea7d34e (patch)
tree38443710b256c2f75e9cd936f5a7a1e0886caf5d /xlators/cluster/afr/src
parent71d6a1c8aaa82780bdf4191732216ac1f5c57e65 (diff)
downloadglusterfs-7a6b1de614c6db02eeb437c06fd2568ccea7d34e.tar.gz
glusterfs-7a6b1de614c6db02eeb437c06fd2568ccea7d34e.tar.xz
glusterfs-7a6b1de614c6db02eeb437c06fd2568ccea7d34e.zip
cluster/afr: Handle op_ret properly in opendir_cbk
Change the success condition to op_ret >= 0 instead of op_ret == 0. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 249 (Self heal of a file that does not exist on the first subvolume) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=249
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index 3bfb29e5a0..cff86cf900 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -115,6 +115,7 @@ afr_examine_dir_readdir_cbk (call_frame_t *frame, void *cookie,
if (op_ret == -1) {
local->op_ret = -1;
+ local->op_ret = op_errno;
goto out;
}
@@ -224,8 +225,8 @@ afr_opendir_cbk (call_frame_t *frame, void *cookie,
{
local = frame->local;
- if (op_ret == 0)
- local->op_ret = 0;
+ if (op_ret >= 0)
+ local->op_ret = op_ret;
local->op_errno = op_errno;
}