We must add new jobs to the tail of the job queue otherwise
old jobs will get stuck in the job list.
Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
lib/loop_job.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/loop_job.c b/lib/loop_job.c
index 23b3eb6..178f816 100644
--- a/lib/loop_job.c
+++ b/lib/loop_job.c
@@ -59,7 +59,7 @@ get_more_jobs(struct qb_loop_source *s, int32_t ms_timeout)
level_jobs = qb_list_length(&s->l->level[p].wait_head);
new_jobs += level_jobs;
qb_list_splice(&s->l->level[p].wait_head,
- &s->l->level[p].job_head);
+ s->l->level[p].job_head.prev);
qb_list_init(&s->l->level[p].wait_head);
s->l->level[p].todo += level_jobs;
}
--
1.7.9.1