summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorNithya Balachandran <nbalacha@redhat.com>2015-09-15 16:07:32 +0530
committerDan Lambright <dlambrig@redhat.com>2015-09-16 06:25:01 -0700
commit0cf1c851b9fc6b98b5839b32ef7e3ff38d87f3c3 (patch)
tree3a2de06fc7653b7be1fa11a455954290e31ddc6a /xlators
parent22882a9b810c4d5c7a7be0f1fac7069422d08b57 (diff)
cluster/tier: Fixed a crash in tiering
An incorrect check was causing the arguments to the promote thread to be cleared before the thread was done with them. This caused the process to crash when it tried to dereference a NULL pointer. Change-Id: I8348309ef4dad33b7f648c7a2c2703487e401269 BUG: 1263204 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12179 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Joseph Fernandes
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/tier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index c86eb4f5514..a6199173688 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -957,7 +957,7 @@ tier_start (xlator_t *this, gf_defrag_info_t *defrag)
}
}
- if (is_promotion_triggered && (ret_demotion == 0)) {
+ if (ret_demotion == 0) {
pthread_join (demote_thread, NULL);
if (demotion_args.return_value) {
gf_msg (this->name, GF_LOG_ERROR, 0,
@@ -967,7 +967,7 @@ tier_start (xlator_t *this, gf_defrag_info_t *defrag)
ret_demotion = demotion_args.return_value;
}
- if (is_demotion_triggered && (ret_promotion == 0)) {
+ if (ret_promotion == 0) {
pthread_join (promote_thread, NULL);
if (promotion_args.return_value) {
gf_msg (this->name, GF_LOG_ERROR, 0,