summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2020-05-21 08:26:11 +0200
committerXavi Hernandez <xhernandez@redhat.com>2020-05-21 08:35:01 +0200
commitc888ef57496e7e81a741d757d7205e98507836c8 (patch)
tree8de0322b723b86286d67ef3cbe76ee8ac036933e
parentd3538f3c32a702c4bdcd747d1d44ac49e0da127a (diff)
glusterd: add missing synccond_broadcast()
After the changes in commit 3da22f8cb08b05562a4c6bd2694f2f19199cff7f, there was a place where synccond_broadcast() was missing. It could cause a hang if another synctask was waiting on the condition variable. Change-Id: I92bfe4e15c5c3591e4854a64aa9e1566d50dd204 Fixes: #1116 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 62fefe2..e565355 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -6769,9 +6769,11 @@ glusterd_restart_bricks(void *opaque)
ret = 0;
out:
- GF_ATOMIC_DEC(conf->blockers);
conf->restart_done = _gf_true;
conf->restart_bricks = _gf_false;
+ if (GF_ATOMIC_DEC(conf->blockers) == 0) {
+ synccond_broadcast(&conf->cond_blockers);
+ }
synccond_broadcast(&conf->cond_restart_bricks);
return_block: