contrib/timer-wheel: fix deadlock in del_timer()
commit eaf3bfa added mod_timers() and successfully screwed up del_timer() by incorrectly wrapping it within double lock blocks. del_timer() was included before the above commit for the sake of timer API completion, thankfully noone used it till now. Change-Id: I07a454a216cf09dbb84777a23630e74a1e7f2830 BUG: 1227449 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11050 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
parent
29d5bd5fc8
commit
9a314fa226
@ -225,7 +225,7 @@ void gf_tw_del_timer (struct tvec_base *base, struct gf_tw_timer_list *timer)
|
||||
if (timer_pending (timer))
|
||||
__gf_tw_detach_timer (timer);
|
||||
}
|
||||
pthread_spin_lock (&base->lock);
|
||||
pthread_spin_unlock (&base->lock);
|
||||
}
|
||||
|
||||
int gf_tw_mod_timer_pending (struct tvec_base *base,
|
||||
|
Loading…
x
Reference in New Issue
Block a user