summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2015-04-27 22:32:59 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-27 21:01:53 -0700
commitddc8dece96b0c04fca564aa3990f484119713720 (patch)
tree96ba99e51d56a75d256bef317aab1de106a85e54 /libglusterfs
parentf692757193bc9464a49b545931f201ba832c24a3 (diff)
libglusterfs: Fix the return value of inode_ctx_get2()
Currently inode_ctx_get2 return success for value2 even if it is not found. This patch fixes the same. Change-Id: I6bf3e6cb280ab3b9b8818bf48dc6e42a349dfa5d BUG: 12002268 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/10412 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/inode.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 7c548653ebf..c010db2a682 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -1898,14 +1898,16 @@ __inode_ctx_get2 (inode_t *inode, xlator_t *xlator, uint64_t *value1,
goto out;
if (inode->_ctx[index].value1) {
- if (value1)
+ if (value1) {
*value1 = inode->_ctx[index].value1;
- ret = 0;
+ ret = 0;
+ }
}
if (inode->_ctx[index].value2) {
- if (value2)
+ if (value2) {
*value2 = inode->_ctx[index].value2;
- ret = 0;
+ ret = 0;
+ }
}
out:
return ret;