From 7a6b1de614c6db02eeb437c06fd2568ccea7d34e Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Wed, 18 Nov 2009 07:02:25 +0000 Subject: 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 Signed-off-by: Anand V. Avati 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 --- xlators/cluster/afr/src/afr-dir-read.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/afr/src/afr-dir-read.c') diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 3bfb29e5a0e..cff86cf9003 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; } -- cgit