From e35b9e272be54c3a2f9f9e7409053c6fb94707bb Mon Sep 17 00:00:00 2001 From: Joseph Fernandes Date: Sat, 12 Dec 2015 15:21:06 +0530 Subject: 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 > Reviewed-on: http://review.gluster.org/12956 > Tested-by: NetBSD Build System > Tested-by: Gluster Build System > Reviewed-by: N Balachandran > Reviewed-by: Dan Lambright > Tested-by: Dan Lambright Signed-off-by: Joseph Fernandes Change-Id: I2df0e29321647fd6eb1719eb3cb7d657fbed3793 BUG: 1291002 Reviewed-on: http://review.gluster.org/12959 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Dan Lambright Tested-by: Dan Lambright --- xlators/cluster/dht/src/dht-rebalance.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xlators/cluster/dht/src/dht-rebalance.c') 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", -- cgit