summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-layout.c')
-rw-r--r--xlators/cluster/dht/src/dht-layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index 1bdad65b70f..ca600e9618a 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -89,7 +89,7 @@ dht_layout_set (xlator_t *this, inode_t *inode, dht_layout_t *layout)
{
dht_conf_t *conf = NULL;
int oldret = -1;
- int ret = 0;
+ int ret = -1;
dht_layout_t *old_layout;
conf = this->private;
@@ -101,7 +101,7 @@ dht_layout_set (xlator_t *this, inode_t *inode, dht_layout_t *layout)
oldret = dht_inode_ctx_layout_get (inode, this, &old_layout);
if (layout)
layout->ref++;
- dht_inode_ctx_layout_set (inode, this, layout);
+ ret = dht_inode_ctx_layout_set (inode, this, layout);
}
UNLOCK (&conf->layout_lock);