From 311de6f96c4fabf30f734e62996ec18817447e2f Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 21 Feb 2012 18:12:41 +0530 Subject: features/index: Set correct ret value in index_add Change-Id: I6314ea25ef26920593a3113eb2951d18255db34f BUG: 763820 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/2786 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/features/index/src/index.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/features') diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c index 98c52220f..12309b83f 100644 --- a/xlators/features/index/src/index.c +++ b/xlators/features/index/src/index.c @@ -392,6 +392,7 @@ index_add (xlator_t *this, uuid_t gfid, const char *subdir) fd = creat (index_path, 0); if ((fd < 0) && (errno != EEXIST)) { + ret = -1; gf_log (this->name, GF_LOG_ERROR, "%s: Not able to " "create index (%s)", uuid_utoa (gfid), strerror (errno)); @@ -409,6 +410,7 @@ index_add (xlator_t *this, uuid_t gfid, const char *subdir) goto out; } + ret = 0; out: return ret; } -- cgit