summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/index/src/index.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 98c52220feb..12309b83f85 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;
}