diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-02-21 18:12:41 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-02-21 22:20:03 -0800 |
commit | 311de6f96c4fabf30f734e62996ec18817447e2f (patch) | |
tree | 9a10d942a73f4226df0c1b72c7847038c8a42bfa /xlators/features/index | |
parent | 42cc043875621a02444f3324b2f9629ac68ab5aa (diff) |
features/index: Set correct ret value in index_add
Change-Id: I6314ea25ef26920593a3113eb2951d18255db34f
BUG: 763820
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2786
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/index')
-rw-r--r-- | xlators/features/index/src/index.c | 2 |
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; } |