summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
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 11:43:57 -0700
commit687f0757c96b7096398de71d908cd77f5a73da0d (patch)
tree9079d7c46a6b5d9711ccc3c2efc3436dd527e7f3 /xlators/cluster
parentef231e41af79803a0e1e8829920b67e736578109 (diff)
cluster/tier: Fixed a crash in tiering
This is a backport of 12179 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 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I5cd4cb9978fc9d3a74f69ef75474fc3b593aadf0 BUG: 1263746 Reviewed-on: http://review.gluster.org/12187 Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster')
-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 4fe6166c4ba..327fcebbaba 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -943,7 +943,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,
@@ -953,7 +953,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,