BUG/MEDIUM: tasks: Decrement tasks_run_queue in tasklet_free().

If the tasklet is in the list, don't forget to decrement tasks_run_queue
in tasklet_free().

This should be backported to 1.9.
This commit is contained in:
Olivier Houchard 2018-12-24 14:03:10 +01:00 committed by Willy Tarreau
parent bb3dac37a2
commit 09e498f1a1

View File

@ -365,8 +365,10 @@ static inline void task_free(struct task *t)
static inline void tasklet_free(struct tasklet *tl)
{
if (!LIST_ISEMPTY(&tl->list))
if (!LIST_ISEMPTY(&tl->list)) {
task_per_thread[tid].task_list_size--;
HA_ATOMIC_SUB(&tasks_run_queue, 1);
}
LIST_DEL(&tl->list);
pool_free(pool_head_tasklet, tl);