summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-12-12 15:21:06 +0530
committerDan Lambright <dlambrig@redhat.com>2015-12-12 07:15:21 -0800
commit01e271a0f14e590ef41db181699cd630e52f1d04 (patch)
treee4f7f540ed56fc24c1f29c214e225bcaf29642ba /xlators
parentb0724fc67d107ecd0c0b281f4be1b8eeef9ba6d3 (diff)
dht/rebalance: Use seperate return variable for destination cleanup
Use seperate local return variable for destination cleanup, without messing with the function return variable. Change-Id: Iaea9ed2927234fdb888aef7a31ec362090e98196 BUG: 1290975 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12956 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index eb9da77d978..8621d1c072b 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1580,9 +1580,9 @@ out:
/* reset the destination back to 0 */
if (clean_dst) {
- ret = syncop_ftruncate (to, dst_fd, 0, NULL, NULL);
- if (ret) {
- gf_msg (this->name, GF_LOG_ERROR, -ret,
+ lk_ret = syncop_ftruncate (to, dst_fd, 0, NULL, NULL);
+ if (lk_ret) {
+ gf_msg (this->name, GF_LOG_ERROR, -lk_ret,
DHT_MSG_MIGRATE_FILE_FAILED,
"Migrate file failed: "
"%s: failed to reset target size back to 0",