diff options
author | Joseph Fernandes <josferna@redhat.com> | 2015-12-12 15:21:06 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-12-15 20:55:53 -0800 |
commit | e35b9e272be54c3a2f9f9e7409053c6fb94707bb (patch) | |
tree | 6b68513106bf6716404a7a56f46fd7b013859b3c /xlators/cluster | |
parent | 37c8cf7a51919600ea793774a5b443dcf8566e94 (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.
Backport http://review.gluster.org/12956
> 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>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Change-Id: I2df0e29321647fd6eb1719eb3cb7d657fbed3793
BUG: 1291002
Reviewed-on: http://review.gluster.org/12959
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 6 |
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 1c5ef80c3bf..d14b92e984e 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1583,9 +1583,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", |